So I’ve got Flex Builder 3, and I’m already whinging. Typical pom.
First off the bat – constructors must be public. Do I need to explain why that is lame? You can’t emulate enums (if there was a native language structure, that wouldn’t be a problem, but there isn’t), or make singletons, or lock down object construction to using the Factory Method pattern. OOP basics! This is actually worse than AS2. The only excuse I could find from an inside Adobe source was this:
Private and protected constructors is not something that the group has been able to tackle yet, and it is a nontrivial change to the language that requires lots of careful thought.
Ideally, we would have been able to think through all the ramifications of private and protected constructors and work with other ECMA members to make sure the design was sound, but that just wasn’t possible in the amount of time we had.
Given this, there were three choices:
1) Delay ActionScipt 3 (and Flex, etc.) significantly.
2) Just “go with” a quick and dirty implementation of private and protected constructors for AS3 and risk compatibility problems down the road once the ECMA spec becomes final.
3) Don’t allow private and protected constructors for now.We went with option (3).
Fair enough, you might say. We wouldn’t want a release of Flex to be delayed over such trivia, would we?
Except, the above quoted excuse was written in 2006. (There was a bug for this logged on the official Adobe Jira in November last year. Talk about the left hand now knowing what the right is doing.) Come on guys, get it together! Next to the lack of method overloading, this is the most glaring gap in AS3.
Flex Builder also forces you into ugly curly-braces-on-the-next-line … you know, like:
public function foo():void
{
// whatever
}
… rather than having the opening brace right after the return type. That’s proper crap, considering they could have just cribbed the already-existing preference from the options in Eclipse for Java developers. I don’t know anyone that uses this ugly indentation style any more. What next, hungarian notation?




Recent Comments