Hi Avik,

Totally cool to push static, not a bone of contention. What you write here and in reply to Alex for me cements the point that we should not treat "AS3" developers as potential hand-coders of ES6. Alex is right, Flash developers are not ready to switch programming languages *and* rendering, styling, etc. APIs and other languages (CSS) all at once.

What's more, for AS4 to ES6 to hit the performance optimized spots does not require ES6 changes so much as measuring on top implementations and looking in white boxes (open source impls).

Feedback on implementors might help, but aligning with their main concern, making the JS patterns actually used on the web (and by stupid old benchmarks, too :-/), is the best way to get high perf AS4-to-ES6 results.

/be

Avik Chaudhuri wrote:
As one of the designers of AS4 (the next version of ActionScript), I can say 
that we are looking mostly to (1) remove awkward ES4 features that come in the 
way of simplicity and performance, as well as (2) limit dynamic features of the 
language and boost static features at the same time. (We have our reasons, and 
I don't want to go into them here.)

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

-Avik.

On Aug 28, 2012, at 5:30 PM, Brendan Eich 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 chain).

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:

http://www.kirupa.com/forum/showthread.php?371078-ActionScript-quot-Next-quot-Flash-Roadmap

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
system.

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 www.ecma-international.org.

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.

/be

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to