Reputation: 14109
I've thought about learning ActionScript (3.0) before, and, as I've heard, it's a dialect of ECMAscript, making it similar to JavaScript. As I come from a JS background, this makes it all too easy to trip up on things that work in JS but are done differently in AS. What are the crucial differences between the two languages that I should watch out for?
Upvotes: 1
Views: 45
Reputation: 3951
Classes/Interfaces (static typing) are the main (obvious) difference and the syntax is more strict. But you have all the convenience of dynamic typing if you want, Closures etc ... and an effective API for UI programming (display object life cycle by events Event.ADDED
, Event.ADDED_TO_STAGE
... etc). There are already ways for immutable values (const
), but not for immutable collections. And check out E4X ... which is nice! Check out the API.
You should feel right at home, after you understand the lexical/syntactical differences.
Upvotes: 2