onActionscript3();

After working with AS3 and loving it for several years, i found that besides things i really like like package’s function, private classes, Function variable, getDefinitionByName … there are many other downside of the language design

Actionscript 3, although is better than javascript (more OOP, strong typing, optional arguments, namespace …) but still misses some cool features that Haxe (and others, like C#, C++ ) has

  • Overloading functions / operators (Polymorphism)
  • Type interference
  • Enumeration
  • Inlining
  • Type definition


Besides the missing features above, I really don’t understand why AS3 doesn’t has

  • A private constructor (easier singleton)
  • Variable declarations in Interfaces (this will boost the performance up a lot than using get/set)
  • Protected / Abstract classes (we did have private class, though)

And the last one is OOP related – Why internal keywords exists ? A scope keyword is used to define the visibility of class elements should have nothing to do with where we put the classes, right ? The arguments that only same package classes has access to internal elements sounds right at first but, it’s not that correct anymore when package being tied to folder structure, as we usually categorize classes into folder (aka package) by their relavant, not how they interact with core/base/internal classes or elements.

I know there is namespace declarations to the rescue but just think that the internal keyword is awkward : little or no use at all

I’m i just wrong or missing something ? Please help me fix those by adding a comment below, your comments are more than welcome !

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s