views:

469

answers:

8

Hi I use AS3 quite a lot for work, but I come from a Java/C/C++ education and find the language quite restrictive.

There seems to be two fundamental camps in the AS3 world:

  • The non-technical creative camp who want to get things working without to much trouble and computer science forced on them
  • The Technical camp (possibly coming from a Java/C# etc education) who are interested in using Flex and are used to relatively complex features in a language (generics, method/operator overloading).

AS3 seems to frustrate both camps:

The primarily creative camp think AS3 is a lot more work than AS2 (and they are correct) and they don't see the point in moving, when the benefits are needed, but the complexity increase and learning curve is relatively quite steep.

The primarily technical camp find that AS3 is existing in some sort of limbo between Javascript and Java, and is only half implementing concepts.

I have my ideas of what I want technically, but I don't think that's the most important issue right now. As why would Adobe make AS3 more technical? It is not being adopted by a huge portion of it's original users.

So my question is how can Adobe, and the user community move AS3 forward, not only technically but as a complete tool, where all users will want to adopt it?

One of my ideas is that AS3 should look at how to become more script like again, but retain typing. Possibly through type inference like in Scala. And also to stop following Java's as if it's the pinnacle of language design, start thinking about the problems the typical users are trying to solve.

+1  A: 

I think ActionScript is gonna evolve towards C#. I do so because I also believe that we gonna see alot more big websites made entirely in Flash/Silverlight. And once you you have a real team with graphic artist and coders working together, C# will save a lot of money. There are better tools and posibilities for developing and debugging more complex applications in C#.

You can see it with the new Flash Catalyst / Flash Builder Premium setup, where graphics and code finally is properly seperated while still allowing the artists to "do their thing".

I am sure Adobe is also gonna try to keep their userbase of designers with some script knowledge. But they can still write in AS2 if they wish. That is properly why they (as far as I know) are gonna keep the Flash Professional IDE around, and with slightly more advanced graphic tools than Catalyst.

So when AS4 is gonna come, I would exspect to see things like generics and method overloading. But it is properly never gonna be C#.

As you might guess I am in the technical camp ;) But working with this professionally, I just can not see a future where the same people design and code. So I do not think Adobe should take the "creative" camps opinion on ActionScript into account. You would not ask a coder how colour selection should work either ;)

Lillemanden
I hope we don't see more websites created entirely in flash or silverlight as I prefer open standards with defined structure. I would not like AS3 moving towards either C# as its a huge standard. I like the feel of scripting languages in that their syntax in concise. A problem I have with AS3 is that it is tending towards the verboseness of C#/Java but without the power. The strength of AS3 for me is that you can get a simple graphical app up and running quickly. I basically want more quick, simple and safe features, not a scripting language trying to be an enterprise platform.
Brian Heylin
A: 

Not sure about influencing Adobe (though you could try Dear Adobe!) but there are good frameworks being developed by the user community like PureMVC. It goes some way toward making AS3 both more technical, so to speak, and also separating out the visuals from the logic so the designers can enjoy a more "creative" experience.

Ollie G
Hey Ollie, thanks for the comment. I've used PureMVC and to be honest I'm not impressed. It seems the designers used a handful of design patterns for the sake of using design patterns. But to stay on topic, AS3 really isn't designed with extension through libraries in mind. There are many existing barriers to writing good libraries, such as lack of Generics and advanced OOP features. As I become a more experienced I see frameworks as a corrupting factor (on the plus side they can enable a team to communicate using common concepts) and that good simple OOP design can go a long long way
Brian Heylin
What really gets me about PureMVC is that they wrote their own event framework instead of using the built-in Flash one (for interoperability with the framework implementations in other languages). Also Singletons for all major classes make it too easy to cheat. And on a large project we found bugs in core functionality (about 1 year ago now) -- although to their credit they fixed them quick.
James Fassett
Ah yes PureMVC was my favorite rant topic for a while :) We used it on 3 projects, and at first made for better communication across the team better due to defined terms, model, view, command, mediator blah. But in the long run, it actually made understanding the code much harder due to the amount of pointless cruft the framework introduces and testing was near impossible with those ridiculous singletons. We ditched PureMVC and are now working with plain old simple objects and clean design decisions, and now the code is cleaner, readable and a lot, lot more testable.
Brian Heylin
+1  A: 

I tend to disagree since I quite like the language. One thing we need to realize is that some of the features that the technical crowd want are VM features and not language features (e.g. threading).

The language needs to be developer friendly and not artist friendly now. Flash has moved a long way from site-intros, vector cartoons, ad banners and simple games. Most often in my day-to-day work it is being used to build custom in-house applications. These have completely different constraints and necessitate the language features introduced in AS3 (e.g. namespaces, strong typing). I've worked on teams of 9+ developers. Javascript isn't meant to handle such large scale developments - which is why Google uses GWT to enable them to write Java code that compiles to Javascript.

There were certainly some features of ES4 that I was very excited about. For example generic functions (basically method overloading), parameterized types (basically generics), generators (using yield) and the let, type, like, unit and wrap keywords. I was and am disappointed it was killed in favour of the watered down ES3.1/ES5 spec (I believe this was more political than technical). I hope Adobe has the strength of vision needed to implement that spec as AS4.

James Fassett
Yep one can only hope that the ES4 spec will be implemented, I really find AS3 stuck in a limbo, where they want you to use strong typing (which I am a fan of, but would prefer type inference) but because of various factors, to implement an elegant solution, you need to resort to untyped objects. Also having functions as objects but how being able to apply even the most simplest typing puts me off using closures as a design pattern.
Brian Heylin
I don't see AS4 becoming Haskell so there is a bounds on how advanced a language it will be. But if they did implement 80% of the features in the ES4 white-paper I linked to then it would be a formidable language. (tail-call optimization built-in! array comprehensions! I could go on-and-on ...)
James Fassett
Yea it really would be nice to see those features in, but I would imagine it's not top of the agenda at Adobe, but it's hard to predict considering the lack of communication from them on it.
Brian Heylin
A: 

I come from the Creative camp; always had a knack for drawing/art, started in the industry as a pure designer, started coding/scripting in Flash 4.

My thoughts are that its going to get harder and harder for the pure Creative camp to really get the most use out of Flash. I was a late adopter into AS2, now playing a little catch-up in AS3. I'm right-brained creative and probably a little ADD, so logical step by step programming/thinking just isn't natural for us.

However I love Flash and so I choose to continue to learn, I honestly don't see how or why Adobe would cater future versions of Flash to non-programmers. More likely they will make it easier for the technical camp to import/use art/sound/video created by the creative camp.

Eventually, I think actionscript will be such a complex language, that it will be mostly the Technical camp and a tiny minority from the Creative camp that use Flash. Maybe that's the case already :o

Leon
Hey Leon, I do agree with you that Adobe will continue down the technical road over aiming AS3 at designers. But I do think designers have a lot of say in terms of simplifying areas of the language, as AS3 has a lot of areas where it is to involved to perform simple actions. As in the example provided in the first link for listening to mouse clicks. Programmers often put up with over complexity as it makes them seems more intelligent, but designers want to get a task performed quickly, so I find it interesting to answer the question "why do I have to type all that just to get that done"
Brian Heylin
A: 

I come from the second camp, but I'm not frustrated -- in fact I'm pretty happy with the language as it is today. If anything frustrates me, it's the limitations imposed by the Flash and AIR runtimes, and the size of the Flex and AIR APIs, but so much the ActionScript language per se.

Sure, I get miffed from time to time about the "missing" stuff -- user-exposed threading support would be really nice, as would method overloading, abstract classes, real enums, etc. -- but on the whole I find ActionScript easily the most flexible language, as a language, that I've ever worked with. I do love my C# and Java, but both feel much more rigid by comparison.

Christian Nunciato
+1  A: 

Maybe you should take look at haXe.

It targets the FlashPlayer (and some other platforms) and offers a more advanced language as AS3. And as it is open source there is definitly more development in the language and in the compiler.

Hippo
I am currently looking into Haxe and it certainly does look like a more advanced language. I have to see how my workflow changes with it, and what tools I can use. FlexBulider is out, so it looks like TextMate is in. We also had trouble getting mxmlc to work with ANT so I'ld be interested to see if Haxe can play well with it, as we use Hudson as a continuous build system.
Brian Heylin
+3  A: 

i'm from the 2nd camp very much ... i did a lot of programming with pascal, later delphi and then java, but then i decided girls and guitars are much cooler ... when i stumbled upon FlashPlayer in 2006, i was fascinated by the possibilities offered and started coding again, with AS2 ... Flash 8 was more of an accident, when it came to coding, so i very quickly moved to MTASC and FlashDevelop and got to know the language very well ... from then on, i had the same struggles as anyone seriously using the FlashPlayer platform ... so here's my point of view:

AS2 vs. AS3

ok, the most important thing is: language != API ... the core AS3 language is most of what is at top level, as well as the following from flash.utils: getDefinitionByName and describeType, as well as Proxy, Dictionary and (arguably) ByteArray (anything else either interfaces with the FlashPlayer or can be built with the core language) ... in AS2 this was moreless all valid types for JSON-values (Boolean, Number, String, Array, Object) as well as Function, and ASSetPropFlags ... the link between the language AS3 and the flash player is small ... for example mod_actionscript is an attempt to use the Tamarin VM as an apache module, with a completely different API of course ...

comparing the core languages, there are differences ... in the end, i'd say AS2 was a much more powerful language than AS3 ... you could practically change the whole language at runtime, it was prototype oriented (which is a much more powerful feature than class based inheritance), allowed mixins, AOP, etc. ... AS2 had a very clear and radical language design ... very few people actually understand that ... AS2 suffered the same misunderstanging as JavaScript (which to me is the untyped and incompatibility-tortured brother of AS2) did ... most people liked it, because it is so permissive ... as PHP for example, which is (apart from its massive market penetration and easy installation) the main reason for its popularity ... but JS and AS are very high level, expressive and powerful languages, whereas PHP is more of a tool to dirtily hack together some stuff (this is not about PHP, i just needed another permissive language to compare too) ... the thing is, what most people use in AS2 (and JS) is the permissiveness ... i very rarely saw the use of prototype based, functional, aspect oriented or even proper object oriented programming in AS2 ... >here< i listed a set of really cool AS2 features, that are either badly or seldomly employed ...

AS3 is Adobe's move towards Java ... it is very strict, static, even at runtime, but performs really much better ... and it is very unforgiving, forcing you to get quite verbous ... describeType alows a really new level of introspection, Dictionary is a nice time saver, and Proxy is the supermutant version of AS2's Object::__resolve, making up a bit for all the flexibility that has been lost ...

speaking about the language, i think AS3 was actually a step backward ... in a time, when high level languages are gaining popularity exponentailly, and when Sun decided to create JavaFX Script, and many other dynamic languages get to run on the JVM and CLR, Adobe decided to create a new, more static version of AS2, and a VM that is good for executing it ... a bit paradox i think ...

when comparing APIs, there are up and down sides of both AS2 and AS3 FlashPlayer API ... the latter definitely is bigger ... when it comes to their intersection (display list, networking, XML handling), there are pros and cons for every solution ... many people are a bit upset, that all the good old callbacks are gone and replaced by the new event model ... seriously, if you use a proper IDE, there is no difference ... but the latter is much cleaner and much more powerful (anyone remember how one mouse-input callback completely shut down all children?) ... also, this is something, that does not really matter, because you can reimplement AS3 event model in AS2, and you can reimplement AS2 callback system in AS2, both in a couple of days ... in the end, i'd say AS3 has a fairly bigger and more powerful API and in case of need, you can wrap it up, to be less verbous ... so in the end, i'd really say the AS3 API is better ... there is really no point in oversimplifying it ...

the point why everyone is moaning is that it requires a drastical change ... until AS2 the language developed step by step, being almost 100% downward compatible to the previous version ... the consequence was, you needed to do a radical switch, instead of a slow transition ... to put it in clear words: going for AS3, meant throwing away anything, which repelled many people, especially designers, because porting code was feasible, but porting .flas really is close to impossible, at least oldschool ones, where code is distributed within countless movieclips ... but really it is not more difficult than AS2 ... it imposes a little more things, but it has quite more features, and adresses many problems, that really everyone has undergone when starting with previous actionscript versions ...

Nicolas Cannasse, the creator of haXe, which was mentioned a few times, also posted some thoughts about this on his blog ... of course his presentation of haXe as the alternative is a little biased ... but i think that is natural ... an important point of haXe is actually to be an alternative to AS3, and Nicolas is both very eager and capable to provide one, although in the end he, as the main language designer, has his own ideas, where the language goes ... but let me talk about haXe as an alternative (this may be partially redundand with Nicolas' post, but i'll just try to summarize my point of view)

haXe as an alternative

I have yet to try Haxe, but it seems to to much of a jack of all trades to really replace AS3.

this is wrong ... Motion-Twin, where Nicolas works, works a lot with flash ... actually, haXe generates much faster AVM2-bytecode, and unlike AS3, allows the use of alchemy opcodes, so in the end, haXe allows you to write much more efficient solutions for AVM2 ... as a language, it is really much richer ... Nicolas' post points out, that unlike AS3, haXe is an open-source language ... what this means in practice is, that it is up to you to join the community and make feature requests, or even to learn OCaml, and to contribute directly ... Philippe Elsass, one of the main authors of FlashDevelop also recently made a nice summary about haXe ... a little less positive, but giving a little overview ... it also links to a post of Nicolas presenting the strongest language features of MTypes, the internal working title for haXe at MotionTwin, before it was released and open sourced ...

haXe is much more expressive than AS3 is ... it has generics, typed first class functions, enums with parameters, to mention a few things not listed in the MTypes feature list ... the using keyword provides some overloading possibilities, but i don't really see why method overloading makes sense ... for future versions, multitypes are planned, which provide a similar functionality ... operator overloading has been discussed many times, and most probably will not be implemented, because it makes code exchange difficult ...

in the end, i believe, haXe is a better language for AVM2 ... and it gets better and better ... more reasons to learn haXe are provided by some community fellows in this stackoverflow question ...

The future of AS3

i think AS3 will not be driven forward too quickly ... Adobe has better things to do ... Adobe uses the FlashPlayer as a platform to deploy Flex apps ... these are written in MXML, which without a doubt as a very powerful declarative language, translated to AS3 ... this is why Adobe needs AS3 and AVM2 to be fast, but not really to be more expressive ... with thermo aka flash catalyst, designers will be excluded from actual coding process and everything will move to Flex, using all the Flex server solutions ...

i don't like Flex and sticking with AS3 is not an option for me ... Adobe is moving the flash platform towards the Java platform, and i don't appreciate it ... i always prefered flash to java because it is so lightweight, and ActionScript because it is so productive ... i was very exited about AS3's new features, but i finally decided to move on because it seems to me, that AS3 developement is starting to stagnate ...

in the end, it's up to you to choose your path ... right now it's MXML (and a bit of AS3) or haXe ... or try writing some language that has an LLVM frontend and compile it to AVM2 using alchemy ... Objective-C might be a good idea ...

so whatever your choice ... good luck ... ;)

greetz

back2dos

p.s.: i think you shouldn't use the term "scripting" language, when you mean that it is high level, expressive and dynamic ... bash script is also a scripting language, but it really is nothing like Ruby, Scala or all the ECMA-dialects ...

back2dos
Thanks back2dos, that's quite an answer. I'll be looking in Haxe over the next few weeks, it looks interesting. The point of my jack of all trades comment was that it seems to be targeting to many platforms. In general development of Haxe looks more active than AS3. I agree that AS3 is in some strange limbo between Dynamic and Static typing, I do feel in general that the complete AS3 system is much better designed and implemented than AS2 but it worries me that the language is moving towards Java. The Java community is moving on but Adobe is trying to be Java from tens years ago.
Brian Heylin
+1  A: 

So a summary of all these answers would be:

There is little to no information about what Adobes plans are for moving AS3 forward. One would presume that they will follow the ECMA spec, but that in itself is in a bit of political turmoil at the moment, so I guess that Adobe are waiting to see how that all turns out.

As for the language becoming simpler, as in easier understand for part-time/utilitarian programmers. This seems unlikely as Flex is aiming to win over people from Java, and so, one would presume that AS will continue to aim to make Java programmers feel comfortable.

Separating designers from the code completely using Thermo/Flash Catalyst seems the most likely future for the Programmer/Designer relationship on Flash development teams.

The Haxe team are doing their bit to make working with the Flash Player a more expressive and less restrictive experience. But, as far as I know, they are not receiving support from Adobe. So it seems like Adobe are not interested in seeing more language choice for Flash Player developers.

Silverlight could give a significant scare to Adobe and force it to make AS a more expressive/professional language, if it manages to approach the market coverage of the Flash Player Plugin. As Silverlight apps can be developed in a powerful and professional IDE, Visual Studio (as opposed to the basic Flex Builder Plugin). And C# is the language of choice, which makes AS3 looks quite limited in a lot of areas.

All in all Adobe are tight lipped about the future of AS3 and the process for growing the language takes place behind closed doors. So in finishing, only Adobe can really answer the question, of where is AS3 going?

Brian Heylin