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
- Overloading functions / operators (Polymorphism)
- Type interference
- 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 !