ActionScript 3 Learnings

I’m learning a lot about AS3 these days. It’s not a bad language, and it’s basically Javascript for Flash. Among the learnings:

  • Actionscript is still really, really slow. About 50-100 times slower than C s my guesstimate, based on what I know about Javascript benchmarks.
  • getters and setter are very slow. It’s 20 times faster to access a variable directly than it is to access it through a getter.
  • I really, really miss arrays of atomic types. Array is an array of object-references (and smart pointers, even), and it’s memory-hungry and not fast.
  • ByteArrays are faster than Arrays and use a lot less memory. I’ll try to use them more.
  • I think in C. Even after two months, I’m still writing int i every time I should write var i : int.
  • I miss block scoping of variables. Especially in for loops.
  • The Visual Studio debugger blows the socks off the Flex debugger

Despite all this I’m starting to really enjoy coding in Flash and getting noticeably faster every day.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s