Article Discussion
ActionScript 3: The Language of Flex
Summary: Adobe announced this week that it would release the next version of its Flex SDK, Flex 3, under the open-source Mozilla license. The language used to create Flex applications is ActionScript 3, an object-oriented, functional programming language. ActionScript 3 is also Adobe's implementation of ECMAScript 4, the upcoming version of JavaScript. In the first segment of a two-part interview with Artima, Adobe Flex evangelist James Ward introduces the key ActionScript 3 language features from the vantage point of developers coming to ActionScript from Java.
9 posts.
The ability to add new comments in this discussion is temporarily disabled.
Most recent reply: December 6, 2007 8:16 AM by jason
    Frank
     
    Posts: 135 / Nickname: fsommers / Registered: January 19, 2002 7:24 AM
    ActionScript 3: The Language of Flex
    April 26, 2007 5:00 PM      
    In this interview, James Ward describes the key ActionScript 3 language features:

    http://www.artima.com/lejava/articles/actionscript.html

    What do you think of ActionScript 3 as a programming language?
    • adrian
       
      Posts: 3 / Nickname: goron / Registered: February 27, 2007 3:41 AM
      Re: ActionScript 3: The Language of Flex
      April 26, 2007 11:07 PM      
      I've been a Java programmer for years and my wife is a Flash/Flex developer. As a result, I often get insights into AS3 and Flex, and I have to say that I'm very impressed.

      The language features, like custom namespaces (linked to XML style URNs) is very nice. The Flash 9 VM is also very impressive and very fast.

      The Flex DOM and runtime are very easy to use, making Swing look like a solution to the wrong problem.

      The only major downside, I see, is a lack of threading support in the VM/language.
    • Rod
       
      Posts: 1 / Nickname: rodhyde / Registered: August 16, 2004 10:49 PM
      Re: ActionScript 3: The Language of Flex
      April 27, 2007 0:23 AM      
      My language of choice is normally Python, but out of curiosity I started evaluating ActionScript 3, along with the Flex SDK, a couple of weeks ago. I hadn't seen previous versions of ActionScript, so I had no idea what to expect, but on the whole I've been pleasantly surprised, as it's quite an expressive language.

      What really does it for me though is the library. It makes it very easy to put together a good looking, responsive user interface. I shall be closely monitoring the ActionScript / Flex world as it looks like it is going places.
    • Roland
       
      Posts: 25 / Nickname: rp123 / Registered: January 7, 2006 9:42 PM
      Re: ActionScript 3: The Language of Flex
      April 28, 2007 2:59 AM      
      So ActionScript 3 has "object-oriented features you're familiar from Java, such as extending classes and implementing interfaces" instead of "prototype-based classes ... In Flex, we hide that because we prefer the other style of object-orientedness: creating classes and extending them in the typical Java-like way."

      It seem that there is paradigm-shift intended for the new JavaScript language: from 'Lisp in C's Clothing' (http://javascript.crockford.com/javascript.html) to Java - Script.
    • Harrison
       
      Posts: 7 / Nickname: hxa7241 / Registered: April 10, 2005 7:41 AM
      ActionScript 3 and Flex 2
      May 3, 2007 7:48 AM      
      I have used it a little. Here are my essential stats: Without type declarations, it is nearly as compact as Ruby (half the size of C++). Running in Flash player 9, it is 75 times slower than C++.

      Optional type declaration is a neat feature. But I wonder if there was any way that 'null-restriction' could have been worked into it. It should be possible to stop things from being null.

      The Flex UI lib is quite easy and simple. But support for long-running work would be beneficial (and probably not implying full multi-threading support). Maybe it is todo. At present it is like old non-pre-emptive Windows -- algorithms must be manually factored into small executional slices. That can be rather awkward. And in direct conflict with the developer's natural inclination to have things easy!
      • Ely
         
        Posts: 2 / Nickname: ely / Registered: May 3, 2007 6:01 AM
        Re: ActionScript 3 and Flex 2
        May 3, 2007 0:09 PM      
        Harrison -- I believe non-nullable types is part of the current ES4 language proposal, but came in too late for Actionscript 3. If it makes it into ES4, it should make it into a future release of Actionscript (since it is an ES4 implementation).

        Ely.
        (Adobe, Flex SDK).
    • cdiggins
       
      Posts: 21 / Nickname: cdiggins / Registered: February 4, 2004 1:54 PM
      Re: ActionScript 3: The Language of Flex
      May 2, 2007 0:19 PM      
      I have to wonder: when type annotations are omitted then Flex uses dynamic type checking, but why doesn't it simply infer the types?
      • Ely
         
        Posts: 2 / Nickname: ely / Registered: May 3, 2007 6:01 AM
        Re: ActionScript 3: The Language of Flex
        May 3, 2007 11:05 AM      
        Chrsitopher -- I am not the language expert by any means, but I think the answer is that AS3 is an (early) implementation of ECMAScript 4, and as such needs to be backwards compatible with ES3 (Javascript you may or may not know and love). Since ES3 says that untype references are dynamically typed, ES4 says the same. Statically inferring types on untyped references would break compatibility.


        Ely Greenfield
        (Adobe, Flex SDK).
        • cdiggins
           
          Posts: 21 / Nickname: cdiggins / Registered: February 4, 2004 1:54 PM
          Re: ActionScript 3: The Language of Flex
          May 3, 2007 4:43 PM      
          > Chrsitopher -- I am not the language expert by any means,
          > but I think the answer is that AS3 is an (early)
          > implementation of ECMAScript 4, and as such needs to be
          > backwards compatible with ES3 (Javascript you may or may
          > not know and love). Since ES3 says that untype references
          > are dynamically typed, ES4 says the same. Statically
          > inferring types on untyped references would break
          > compatibility.

          I suppose then that this leaves the issue of type inference open for tools such as an IDE to solve.

          I wonder how much interest would exist in tool support for type inference in any of the ES derived languages?
    • jason
       
      Posts: 1 / Nickname: buhayjason / Registered: December 6, 2007 2:06 AM
      Re: ActionScript 3: The Language of Flex
      December 6, 2007 8:16 AM      
      hello,

      i would like to know if how is it possible to call java class from AS3? im looking for something like flash remoting in AS2. thanks