Convergence options for Ecmascript/Actionscript?

Avik Chaudhuri avchaudh at
Wed Aug 29 05:22:56 PDT 2012

As one of the designers of AS4 (the next version of ActionScript), I can say that we are looking not only to (1) remove awkward ES4 features that come in the way of simplicity and performance, but also to (2) limit dynamic features and boost static features at the same time. (We have our reasons, and I don't want to go into them here.) As such AS4 may be moving further away from ES instead of coming closer.

That said, one possibly interesting avenue for future work would be a cross-compilation story from AS4 to ES6 that hits the right optimizations in the underlying implementation (i.e., the translation reuses the constructs and code patterns that ES implementations naturally optimize for).

Of course, a part of Adobe is also devoted to HTML5/JS futures, but at this point they are disconnected from ActionScript evolution.


On Aug 29, 2012, at 2:19 AM, Alex Russell wrote:

On Wed, Aug 29, 2012 at 10:05 AM, Claus Reinke <claus.reinke at<mailto:claus.reinke at>> wrote:
Since this seems to be open to misinterpretation:

I'm looking at this from a JS developer perspective, and since ES4
failed, I was *not* asking to make ES6 any more like AS3.

What I thought would be interesting can be reduced to two points:

1. promoting ES6 to AS3 developers, so that they do not get hung
   up about "downgrading" from AS3 to ES5, when support for ES6
   features like minimal classes and proper modules are just around
   the corner

What I was trying to say above (and may have failed at) is that I don't think this is either productive or necessary. It's not necessary because AS3 users may, though a variety of means, continue to use AS3 which generates to a large new set of web-based targets. It's not productive because AS3 users aren't so much "AS3 users" as they are "Flash developers". That's a difference at a platform level, not a language level, and we should never confuse them (although many, many people do).

What Flash developers will gain and miss by moving to the web is a world apart from what we could potentially provide in JS.

2. getting feedback from AS3 developers: did they really need the
   extra features that ES.nexts are not going to have, what was their
   experience with the features that AS3 has in some form and ES6
   is going to have in some other form. And do those who went
   through the AS3 to ES5 transition have useful observations?

If you'd like to do that sort of ethnographic research, I think it might have some value. That said, we haven't undertaken projects in ES6 that have been motivated by high-minded ideas about the "right way" to do things; instead we've focused on community-expressed and observed pain points. Not everyone thinks everything we're undertaking is valuable (as is their right), but each change is designed to address real issues from real users today. Finding ways to plumb our *own* community for the relative levels of pain they're feeling seems, on balance, like a more productive bit of research.

So the changes would be for AS3 and its developers to make
(and it is my impression that Adobe is already working on cross
exports from their tools to HTML/Javascript), but the changes
from ES5 to ES6 could help them, and there might be something
to learn from AS3 developer experience.

Hope this avoids misunderstandings,

What Brendan said.

Let me just add this:

Flash isn't about AS3 (particularly). It's an entire environment, event
model, rich library of APIs, and a deep toolchain that allows developers to
be productive. Even if we were to adopt the (foolish) goal of adding
missing AS3 features to ES, that wouldn't allow Flash developers (as a
group) to move seamlessly to a JS world.

Flash always has been a compiler-mediated format. Their bytecode is
testament to that. To the extent that there's going to be a transition
strategy, I expect it to be a feature of the system that already has the
user-exposed compile step (Flash), not the one that doesn't (JS).


On Wed, Aug 29, 2012 at 1:30 AM, Brendan Eich <brendan at<mailto:brendan at>> wrote:

Claus Reinke wrote:

Hope this isn't politically inappropriate here;-)

1. Flash is dying as a browser plugin, but otherwise still alive,
   especially with compilation of Actionscript to native code [2,3].

2. Adobe has been growing support for HTML/Javascript options.

3. Actionscript is based on an old ES draft standard that failed to
   reach consensus, partly because its changes were considered
   too much at once. [my impression - I don't have a reference]

You really should read back in es-discuss if you have time (understand if
you don't!). We covered what made ES4 fail. The main problem was
namespaces, upon which packages were built.

Unfortunately, AS3 uses namespaces and packages heavily. Mozilla's Shumway
project includes an AS3 bytecode recompiler that generates JS, and we
cannot lower namespaces to anything native and JIT-optimized in JS itself.
Cc'ing Tobias in case he can comment.

 4. Lots of Actionscript developers find themselves having to
   grow accustomed to the world of HTML/Javascript

Developers do adapt, of course.

 One consequence of 4 are blog posts about "Javascript technology
X, for Flash developers". When I read such blog posts (eg, [1], with
side-by-side comparisons of AS and JS code), I get the feeling that
the transition would be much easier from AS3 to ES6, where things
like modules and minimal classes exist. There is an opportunity here,
if those parts of the standard are sufficiently stable to recommend
transpiling (until real ES6 implementations come along).

Namespaces and packages are the problems (really one problem, namespaces
making lookup three dimensional rather than two dimensions (proto and scope

 One consequence of 3 is that there should be a vibrant community
of AS developers who have practical experience with features similar
to those considered for ES6, in a Javascript-like language.

Not similar enough, in my view. Not only does AS3 have namespaces, it uses
them for class-private and IIRC protected visibility. IIRC AS3 classes do
not have class-side inheritance (just like Java), another difference.

Finally, AS3 was really intended, along with an implicitly early-bound
namespace, to statically judge the meaning of names and even types. Its
code loading and global object model is entirely unlike the Web's.

 Yet I
do not see any experience reports or spec feedback based on that
here on this list. Wouldn't it be very helpful to invite such input?

I think not. Some of us were involved intimately in ES4. We have the scars
and remember the differences. ES6 does not need more constraints or feature
demands from newcomers. That is a sure way to kill it.

 I don't expect Actionscript developers want to lose any of their
language features, but there might be profit (for both AS and ES
developers) if Adobe could try to align AS4 to ES6 so that the
common language subsets have common syntax and semantics.

That's up to Adobe, but I recall that they are talking about going more
their own way:**showthread.php?371078-**

 Such a hypothetical AS4 would be a typed version of ES6, making
it easier for Adobe's tools to support both, and making it easier
for developers to use or maintain either.

No typed (static) version can work interoperably and soundly with the
dynamic language. This was one of the conclusions of the ES4 work. How to
interface typed and untyped (dynamically typed) code is still research. Sam
Tobin-Hochstadt's Typed Racket work is one example of research along the
lines of interconnecting dynamic and static code without losing soundness.

Even throwing out soundness may break interop. We'll see how this works
for Dart, but right now Dart is a dynamic language with an early warning

 Are there any Adobe folks listening here? Does anyone have the
contacts to raise the question with them? Do you agree that there
is potential for useful exchange of information and joining of
efforts if the wall between AS and ES could be lowered?

Adobe folks departed the Ecma TC39 field, although IIRC Adobe remainds a
member of<>.

Again I must comment that ES6 wants no new constraints and pressures.
Scope creep is the enemy.

Also, you should not ignore the ES4 lessons learned or assume the problems
were not material and inherent to the divergence between AS3 and ES3.


es-discuss mailing list
es-discuss at<mailto:es-discuss at>**listinfo/es-discuss<>

es-discuss mailing list
es-discuss at<mailto:es-discuss at>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list