Side-stepping ES4

The news is that the proposed ECMAScript 4 (ES4) that created such a stir in the ActionScript community half a year ago is no more. Instead the ECMAScript working groups is going to pursue an update to version 3. I say good riddance to ES 4, it had a lot of interesting stuff in it that I would have loved to see in ActionScript, but that was only because ES4 had every possible feature from every language that its authors had ever laid their eyes on.

I really like JavaScript/ES3, it works very well for me and trying to make it more enterprisy by adding things like class based inheritance feels pointless — why reinvent the language so completely? Why not just invent a new one instead?

ActionScript 3 works for me too, but mostly because it is not JavaScript. ActionScript may have a JavaScript-like syntax, but is in fact much more like C#. When I write large applications I want packages, classes, interfaces and proper inheritance (although I’m the first to say that AS3 goes a little too far and isn’t dynamic enough). When I write scripts to manipulate web pages I like to have the dynamics of JavaScript, the rigidity of classes and strict type checking isn’t helping me there.

It will be interesting to see how Adobe reacts to the decision (even though they were a part of it). It may be a hard blow for them as they were in a good position for making their ES4 implementation Tamarin more or less the gold standard. They have staked too much in AS3 to backtrack and implement anything like ES3.1, so the question is whether Adobe will continue to work on AS3 (4?) by themselves, or try to get the ECMAScript working group to continue work on ES4 in parallel, but that doesn’t look likely.

In a way this may be good news for ActionScript programmers since Adobe is more free to develop it on their own, there’s no committee to slow things down, and no standard implement but the standard that they define themselves. I don’t believe in design by committee anyway, so I’m happy. The web gets ES3.1 which is much more appropriate than the proposed ES4 was, and Flash and Flex get a language more suited to application development.

Update Mike Chambers has clarified Adobe’s standpoint:

To sum up, ActionScript 3 isn’t changing and we are not going to dumb down future versions or ActionScript. We are going to continue to innovate on the web with the Flash Player, and push the web forward, as we have done for over a decade.

Not surprising, but good to hear from the horse’s mouth.

17 Responses to “Side-stepping ES4”

  1. Danny Miller Says:

    I agree and disagree with your points. I think it’s important that some global standard be introduced, and while the current ES3.1 may be appropriate in today’s web enviornment, ES4 was more appropriate for the future as web applications become more powerful and integrate with other technologies (legacy code etc). I agree that it may be good in the short term for adobe as there are no timetables anymore, but I think the the web needs a standard that progresses. ES3.1 doesn’t have overloaded constructors, specific array types, private constructors, static classes, etc… a bunch of features that Java (I consider a competitor to ES) does support. I do understand and respect your commentary on the news however, it will be interesting how things will develop… Now we may not have to wait until 2009/2010 for AS4

  2. simple guy Says:

    ES4 was a mistake. Wouldn’t it be nice if Adobe would just say, “oops” and start work on AS2.1

    http://www.betterthansimple.com/blog/2008/08/14/ecmascript-v4-derailsfinally/

  3. TK Says:

    I think that ES4 was a good idea. I haven’t been following its development, but I definitely believe that Adobe should jump toward implementing almost “every possible feature from every language that its authors had ever laid their eyes on.” I would definitely propose generics, annotations, static imports, overloading methods and constructors… can you tell I love Java? Anyways, I hope that whatever we get next outta Actionscript is more or less an even more honed and tuned version of AS3 moving to a more Java-like language. Also, Adobe, PUSH AS4! We all can’t wait for the performance gains, the added features, and all the goodies that come along with the suggested improvements. Don’t let this be an excuse for you to lay dormant!

    @simple guy: The web is on a jet-set collision course with OOP. AS2 has a ton of nightmares that go along with it, AS3 has a lot less. AS3 makes building gigantic applications a heck of a lot easier than in AS2. Why do you think we should go back to the AS2 age?

    • TK
  4. Theo Says:

    Fair enough, it would be nice with generics, and it would be nice with non-nullable types, on-the-fly type definitions, method overloading, scope local variables, operators as functions, multiline strings, array comprehensions, wrapping and so on. However, if you throw all of these in you get a horrendously complex language. I’m not sure I trust Adobe as far as making it work. Just look at my MXMLC WTF series, there’s a lot in AS3 that the compiler just chokes on.

    My main gripes with AS3 are the problems that are there in the language now, adding features before fixing what’s wrong now is the wrong course of actions.

    We will get (very limited) generics in Flash Player 10 with the Vector type, but that sort of illustrates Adobe’s take on language design: it’s not consistent. In this case they introduce new syntax, but limit the validity of the syntax to one type.

  5. TK Says:

    I agree, Adobe needs to fix things in AS3! Especially relating to garbage collection. I’ve ran profiling tests on garbage collection and 70-80% of the time, garbage is generated that cannot be deleted among other things.

    The Vector thing is a great idea, but without allowing developers to control generics, it seems that Adobe is just throwing it in there as another teaser for a future version of the language which may actually contain generics in detail, allowing us to create Collections and generic extensions: Collection etc.

    But I digress… what are we developers going to do about this? If we had some rad open-source developers at Adobe working on Flash Player, I’m convinced that in less than a year we’d have ourselves a language as powerful as Java, yet suited for the frontend, allowing designers and developers to harness power never before conceived… wow, I’m scaring myself.

    • TK
  6. simple guy Says:

    @TK: I think that going back to AS2 would be a step forward, not back. AS2 (following in ECMAScript 3′s footsteps) is heavily object-based, dynamic, and has a low barrier to entry. Sure it has its warts, but most of those flaws were introduced into ECMAScript 3 by the influence of Java.

    With the adoption rate of languages like Python and Ruby, AS3 seems like a weird step back. As the programming community embraces dynamic, strongly typed, interpreted languages; AS3 heads for static typing, interfaces, and compilation. If that’s the road ActionScript is on, why doesn’t Adobe save themselves the trouble and start using Java Applets?

    So, what is it about AS3 that makes building gigantic apps so much easier?

  7. Theo Says:

    @simpleguy: I was going to say that going back to AS2 would be a very big mistake, but then I remembered that the problem with AS2 wasn’t only the language but also the API and the implementation. It was a pain to work with the display list, movie clips couldn’t be moved from one parent to another, event handling didn’t work very well (and there were three different even handling styles), methods weren’t properly bound (remember Delegate.create?), inheritance could stop working if classes were compiled in the wrong order, and so on. Frankly, working with AS2 was a pain. Not only of the language, but also because of the implementation and the API.

    I think that AS3 went a bit too far down the strictly-typed-class-based-language path making the dynamic parts a pain to use (for example anonymous functions require that you specify a return type, although that type can’t be used by the type checker anyway because it’s not a part of the function’s signature). But AS3 provides a much more stable runtime than AS2 ever did.

    Remember that classes in AS2 were just syntax sugar for prototype inheritance, and although I don’t think there’s anything wrong with prototype inheritance I don’t think it is appropriate to try to create class based inheritance on top of it because it leads to weird, weird things in edge cases. I was bitten by those more than once.

  8. TK Says:

    Yeah, and AS2, while a great move towards OOP, is far from an object oriented language. Think of how few open source class libraries there were for AS2 and now how many are for AS3. The community has gone nuts with 3D engines, physics, drawing, text… the list goes on and on!

    I think that the community IS a little divided on this one, but I believe that AS3, though it has its bugs, was a huge leap for Flash and was necessary.

    • TK
  9. simple guy Says:

    You’ve got some good points.

    The improvements to the API were a big gain, and perhaps the “drastic” change of AS3 was needed to allow Adobe to clean house. Even just the annoyance of trying to remember which properties had underscores forced many (including myself) to write a home-grown API layered on top of AS2.

    The speed improvements are also a nice gain, and static-typing and early binding certainly made those speed improvements easier to implement in the VM.

    Despite my preference for more dynamic languages, AS3 has been adopted by enough developers to make it hard to ignore, and Flex is also getting serious traction. So, until something better comes along, I’ll keep a safe distance and hire someone else to write it.

  10. ES standard, GXP, Other stuff | Deespatch Says:

    [...] Iconara [...]

  11. Bruce Says:

    I’m not trying to start a fight, but people complaining about how complex AS3 is and how we should go back to AS2 need to get a grip. If it’s too hard for you, why not just admit it?

    Pay attention to what so-called ‘real’ languages like Java and C# have to offer, and, since you are creating what is essentially web-delivered software, start thinking like a software developer instead of a scripter. You’ll get better work.

  12. TK Says:

    Bruce, agreed. I learned AS3 last year and haven’t coded in AS2 once since. It’s a big leap, but once you get your feet wet in the world of OOP, you never want to go back. Most of the Flash community is stuck in “scripting” mode, you know, making cool little animations, a bouncing ball here and there, but that’s not the future of Flash! AS3′s future is large-scale web applications, not gadgets.

    • TK
  13. Zack Jordan Says:

    It saddens me a bit to see ECMA4 go, but I do hope that it frees Adobe to continue innovating. It’s rough out here on the frontier, but I think the entire community always benefits from innovation- once they are dragged, kicking and screaming, into the present.

  14. Rodrigo Says:

    @Tk and Bruce:

    The point you aren’t seeing here is that the Flash community is conformed in two main branches: Coders and Designers (even though are many shades of gray right there… ;D)

    What I think is that Flash started as anything BUT an programming IDE. Most graphic designers lack the logical thinking required to program (But we do great graphics…that most programmers cant!)

    So the main issue here (at least to me) is:

    -If I need to learn how to program in AS3, I would wait until the language has settled and improved (maybe AS4). There are many things still wrong right now.

    -I.e. Trying to add simple interactivity with AS3 is a truly a pain in the neck! (Don’t start saying how simple is to add a class or whatnot…it’s not that simple for most scripters)

    Im not going against the Flash as a programming tool, but I demand Adobe to provide a tool, for us designers, or give us back some power inside Flash.

    An interesting post for you to read would be this:

    http://www.insideria.com/2008/07/the-charges-against-actionscri.html

    Cheers!

  15. simple guy Says:

    @Rodrigo:

    It’s not unreasonable for you to expect easy ways for doing simple scripts. Sadly, there seems to be a misguided (possibly even elitist) assumption in the AS3 community that a “grown up” language must exclude the simplicity and “scriptability” that allowed Flash to become so wide-spread in the first place.

    Developers want classes, strong typing, and the like; but this does not have make the easy things hard.

  16. TK Says:

    Yes. AS3 was a move toward DEVELOPMENT, though it had its benefits in performance for design, etc. I totally agree though, I coded in AS2 before AS3 and the simplicity of adding interaction was a definite draw for me back then. With the advent of Flex, it appears that Adobe’s focus is entirely on development, rather than design. We’ll have to see (and hope) that Adobe starts targeting design in Flash and implements an easier way to throw designs together. I again state that I believe that AS3 was necessary, but I do agree with Rodrigo in saying “Flash started as anything BUT an programming IDE.” Now, though we have the power of AS3, we are moving away from design in Flash and toward development. I’m not a Flex guy, though I see the need for Flex. (I do believe that we need to get off our butts and develop some open source version of Flex. Flex just isn’t that flexible and you end up locked to something you can’t truly modify) We’ll just have to see what Adobe’s up to with AS3.5 and the new releases of Flash Player and CS4.

    • TK
  17. Rodrigo Says:

    I agree with both TK and Simple Guy.

    I know that if I want to be still in the market 5 years from now….I MUST learn AS3/AS4. AS2 is a total waste of time looking in perspective and into the future.

    It’s not an option at all.

    And far as I have seen, AS3 can work absolute wonders, no question about it. Still, I don’t want to write down a whole class just for simple interactivity…Lol!

    Now, for you Coders out there:

    Everything points right now to the fact that AS will remain a proprietary language and that will go separate ways from Java and so forth. Is this true? Can we expect AS”X” to replace Javascript and et al in the next 5 years? It has stalled after all, hasn’t it?

    Thank you for the positive comments, by the way!

Leave a Reply