4 ms·
As the other commenters said, the arrow functions, which are very comfortable and very directly inspired from CoffeeScript. But more importantly, the whole ide
by tinco 8y ago
As the other commenters said, the arrow functions, which are very comfortable and very directly inspired from CoffeeScript.
But more importantly, the whole idea of ES6 was inspired by CoffeeScript. This might seem weird if you were outside the loop at the time and don't realize how succesful it was, but the fact that ES6 got so many cool features was directly due to CoffeeScript's success.
If ES6 wouldn't have those features, people would not have switched from CoffeeScript back to pure Javascript. And the success of Typescript shows that they still have to move quickly to keep pure Javascript relevant.
Here's a list of comparisons between CoffeeScript and ES6/7:
https://github.com/hemanth/coffeescript-equivalents-in-es6 https://github.com/hemanth/coffeescript-equivalents-in-es6
Note that these are features that were not in ES5, then they were in CoffeeScript, and only then were they added to ES6. The similarities are in no way a coincidence, almost all of CoffeeScript was in one way or another integrated into ES6.
- WorldMaker 8y agoI don't think it is an either/or. TC39 has shown that they love multiple implementations of things. CoffeeScript and Typescript (and Babel) implementing things together ahead of the spec, and how they agreed/where they differed/what obstacles they encountered, was likely as much of a factor as either language in isolation.
- zamalek 8y ago> the arrow functions, which are very comfortable and very directly inspired from CoffeeScript. "Arrow functions" (lambdas) existed long before CoffeeScript. Arrows of varying types (usually => or ->) have been standard syntax for lambdas for easily decades. One of the language designers on the TS team was involved in a language that had lambdas a year before CoffeeScript came into existence. To call lambdas a CoffeeScript innovation is like calling actors an Elixir innovation. On the subject of CoffeeScript inspiring ES, that is likely very true - at the very least it lit a fire under an extremely stale language. They carefully selected some very good ideas that worked well together and made a beautiful language with them. However impressive, beautiful language design is not innovation. Something like optional any is.
- tinco 8y agoIf CoffeeScript didn't have arrow functions, I don't think ES6 would have had arrow functions. CoffeeScript had this mix of language features I think any language aficionado could have picked up at the time. It was just crazily succesful, no doubt due to its flawless execution by Jeremy Ashkenas.
- pjmlp 8y agoI really haven't noticed any mark of its success on the German job market.
- lucideer 8y ago> "Arrow functions" (lambdas) existed long before CoffeeScript I think the question was about whether they existed in the JavaScript community. I'm sure much of Typescripts great features are not completely novel nor unique—e.g. generics come from c# and Java—but it is responsible for bringing them to JavaScript.
- lucideer 8y ago> the whole idea of ES6 was inspired by CoffeeScript. This might seem weird if you were outside the loop at the time and don't realize how succesful it was, but the fact that ES6 got so many cool features was directly due to CoffeeScript's success. Not sure what "outside the loop" means here but do you have a source for this statement? I followed ES proposals quite closely throughout and wasn't aware of any such thing. > Here's a list of comparisons between CoffeeScript and ES6/7: > Note that these are features that were not in ES5, then they were in CoffeeScript, and only then were they added to ES6 Unless you supplied the wrong link, I think you're mistaken here. Of the many examples in the link, the majority are code that was in ES3, or—in the case of array methods—bare little resemblance to Coffescript (I think a lot of those were inspired by Underscore). The exceptions are fat arrows and spread, and I think the latter has a more complex history. Two other notables in that link: lexical scope was in JavaScript 1.7, introduced in Firefox 3.6, predating Coffescript's introduction. Generators had an early form in JavaScript 1.8 but the syntax changed for es6, and Coffescript adopted it after es6.
- tinco 8y agoI supplied the right link. I suppose we're reading the page differently. If you don't think that page is evidence enough that CoffeeScript inspired much of ES6 then I suppose we experienced the times differently. Here's a nice article showing that CoffeeScript was on Brendan's mind when he was working on Harmony (ES6): https://brendaneich.com/2010/11/paren-free/ https://brendaneich.com/2010/11/paren-free/ He calls Ruby/Python/CoffeeScript "unsyntax" and he doesn't like it I think :P edit: apparently he does like it, he just doesn't think it would work on the web, he elaborates here: http://intertwingly.net/blog/2010/11/25/Hobgoblin-of-Little-Minds http://intertwingly.net/blog/2010/11/25/Hobgoblin-of-Little-...
- lucideer 8y ago> I suppose we're reading the page differently. If you don't think that page is evidence enough... The page is a list of examples of Coffescript done in Javascript. Whether they show evidence of Javascript taking features from Coffescript isn't really a subjective question; they do or they don't. I explicitly enumerated which do and which don't. In terms of "experiencing the times differently", that is subjective, so I guess we did. One blog post from Eich on why he doesn't want to remove braces isn't really holistic, but you might be right in general.