Hacker News new | ask | show | jobs
by evincarofautumn 4991 days ago
“Sadly, Adobe has missed to provide a language specification for ActionScript and for that reason never really made the list of what I consider well-designed programming languages.”

I develop an ActionScript-to-JavaScript compiler. The lack of a spec wouldn’t be so bad if the reference implementation (Flex/ASC) were any good. There are innumerably many bad things about ActionScript-the-implementation that make ActionScript-the-language seem a lot worse than it is. Maybe I’ll blog about them sometime. Even at that, I’d rather write a web application in AS3 than in TypeScript. And soon I’ll be able to. :)

“I am in particular interested in Array, because Arrays turn everything you put into them into untyped Objects. In ActionScript Vectors are therefore a better choice.”

ActionScript “Vector.<T>” is not statically checked—by Adobe’s compiler, anyway. Inserting an element of the wrong type fails at runtime with an abstruse error message.

The problem with these languages really is their dynamic typing; type annotations don’t buy you anything if you can’t make semantics-preserving transformations because someone can (and will) use dynamic features. TypeScript had a chance to be innovative, but I suppose Microsoft figured that static typing just doesn’t market well to JavaScript developers.