Hacker News new | past | comments | ask | show | jobs | submit login

No, TS came in October 2012, after ES4 was laid to rest by Harmony (July 2008). Its type system differs notably (e.g., bivariant generics, structural-only subtyping). There's an interview with Lars Bak and Anders Hejlsberg here:

http://channel9.msdn.com/Shows/Going+Deep/Anders-Hejlsberg-a...

At one point, Lars and Anders both say they liked ES4 and they wondered why it died. I LOLed a lot :-|, in view of how their employers were intimately involved in killing ES4.

(I write this without rancor, as ES4 needed to die.)




> (… as ES4 needed to die.)

Why is that by the way? From what I read at the time in the PDFs it seemed nice and not out of the ordinary. Did you ever wrote about technical failures of ES4 and I missed it?


From twitter (https://twitter.com/BrendanEich/status/575427109977378816):

* why ES4 had to die? https://news.ycombinator.com/item?id=8906807 says why in brief: "But ES4 was trying for too much too soon." Adobe bailed, too.

* (yet MS was about to give in! If only Adobe had known.) ES4 toward end was not AS3-compatible because JS wasn't AS3 compatible.

* enabling incompatibilities under opt-in version selection was fairly toxic to all implementors (V8, JSC esp. ) and many users.

* With 1JS idea, based on modules (classes, also generators via function*), new syntax is its own opt-in: no big red mode switch.

Update: also the "ECMAScript Harmony" email I wrote in July 2008 talks about the problem of namespaces:

https://mail.mozilla.org/pipermail/es-discuss/2008-August/00...

The early binding problem for the Web with multiple script tags was not an issue for Flash with a single SWF link-time tooled image.

The open namespaces costs can be thought of as a third lookup rib for identifiers beyond scope chain and prototype chain -- anything like this (e.g., scoped object extensions a la C#) is still bouncing off of engine implementors.


I like ES6 and how ir was carefully modernized a lot. But ES 4 (at least as it is implemented by Action Script 3) is a pleasant language to work with as well.

— jhnns


Fair enough, and I led Mozilla to work in earnest with Adobe on ES4 and Tamarin, to get MS to re-engage with Ecma TC39 beyond ES3 (also for ScreamingMonkey: ActiveScripting uplift of IE to support ES4 via Flash without MS's cooperation).

But we couldn't map AS3 directly to ES4, because Flash was too different from the Web: single SWF link-step and static typing were two big diffs.

Even now static typing in dynamic code loading environment, or "gradual" or "hybrid typing" if you will, is not quite a solved problem. SoundScript or whatever it's called is an experiment, as the V8 folks have been careful to say.


(past ES4 champion from the Adobe here)

I agree with Brendan about the difficulty of mapping features from AS3 (Flash) to ES4 (the web). I'd go a step further and say that the only way this even would have been possible is to grow it out of the host's DNA of JS1/ES3.

Even if at a high level many of the emerging features of JS look like those in AS3/ES4, they are in their details profoundly different. This is as it should be. They need to grow out of the primordial stuff of JS1, not AS3. I suspect that the ES4 effort has informed many of those now working on ES.next in a way that wouldn't have happened otherwise. So in that sense, at least, ES4 lives on.


I see...

After ES6 finally providing a concise syntax for prototype inheritance, hybrid typing is the last "AS3 feature" I'd love to see in ES.

But btw: You guys are doing great job! I totally agree with your approach of evolving slowly and considering community feedback.


Harmony feels a lot more like JavaScript than AS3 ever did, and has some clear improvements (lambda arrows, destructuring, `...` syntax that also works in function bodies, etc.). That said, part of me wonders if the web would be any different if we had some of these tools 10 years ago.


(I write this without rancor, as ES4 needed to die.)

Apparently Chrome feels the same about ES6 .. they continue playing launch pad chicken (only 39% on Kangax)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: