4 ms·
Can anyone explain what the difference between TypeScript and ECMAScript 4 are? I know ECMAScript 4 was abandoned for some reason, but from the few examples I'v
by seanalltogether 14y ago
Can anyone explain what the difference between TypeScript and ECMAScript 4 are? I know ECMAScript 4 was abandoned for some reason, but from the few examples I've seen of Typescript it looks very similar. Did the js community just need a few more years to come around to the ideas?
- phase_9 14y agoECMAScript 4 was implemented in ActionScript 3[1]; a very nice language to work with IMHO. The members of the ECMAScript steering group launched into a public fracas on their respective blogs[2] which eventually ended in the draft being canned, despite the fact both ActionScript and Silverlight were already based on the standard... shame. [1] http://en.wikipedia.org/wiki/ActionScript#ActionScript_3.0 http://en.wikipedia.org/wiki/ActionScript#ActionScript_3.0 [2] http://blogs.msdn.com/b/ie/archive/2007/10/30/ecmascript-3-and-beyond.aspx#5788577 http://blogs.msdn.com/b/ie/archive/2007/10/30/ecmascript-3-a...
- camus 14y ago> The second system syndrome is that evil effect that often happens when redesign a small, working system so that it becomes a huge leviathan built by piling new features over new features. > Today I was reading the overview of ECMASCript 4 from ecmascript.org, and I got this very bad feeling that maybe the fourth version of ES, is suffering of an extremely strong case of this problem. I dont know who is that guy , but what a load of cr*p ... it's people like him that got us stuck with what is javascript today. People often complain that Flash prevented Javascript from being widely adopted , the truth is that Macromedia/Adobe tried to push a better Javascript that would have helped the language then and today. Imagine we had ES4 and HTML5 today. Nobody would be complaining about how much javascript sucks , and there would be no need for typescript, coffeescript ,etc ...
- riffraff 14y agoactually, it's my words[0] :) I wrote it many years ago, but if you think it's wrong I'd be happy to understand why. I have never been against Flash nor ActionScript(which I don't know enough to criticize) but my understanding was that ES4 was vastly more complex than even AS ever was, rather than being an incremental change as ES6 is. And please note I wrote """ ECMAScript 4 seems cool, I want to use a lot of those things (yay for multi method dispatch!), but maybe it is changing the language a little bit too much . """ And I wish I could influence what the dev world does, but I believe it is unlikely. [0] http://www.riffraff.info/2007/10/25/ecmascript-4-the-fourth-system-syndrome http://www.riffraff.info/2007/10/25/ecmascript-4-the-fourth-...
- camus 14y agoES4 ~= Action Script (with packages , classes , interfaces ,etc...) The problem with typescript is that there is no real built-in module support you either need AMD or CommonJS that's why i wont use it. The language is great but i dont want to have to use requireJS to create reusable components. Funny how Microsoft rejected ES4 and now is "praising" and "advocating" for better web scripting language. That's hypocrisy.
- lucian1900 14y agoAfaik tsc can also compile to CoffeeScript-style modules if asked.
- chr1 14y agoProbably you've seen examples of ES6 which is actively developed now, and many features from it are already available in firefox nightlies. ES4 was abandoned 3-4 years ago. It was partially implemented in firefox, and ff addons used it. One of it's features that didn't made into ES6 was inline xml inside javascript. It was recently removed from firefox.
- dugmartin 14y agoIt looks very much like ECMAScript 4. I've done a lot (too much) Flex/AS3 coding and I plan on using TypeScript for my next big Javascript project. Static type checking makes a whole class of problems on large applications just go away.