4 ms·
”we provided the most advances to the JavaScript language out of any contributors by far” How do you figure that? As far as I am aware that honor goes to the C
by tinco 8y ago
”we provided the most advances to the JavaScript language out of any contributors by far”
How do you figure that? As far as I am aware that honor goes to the CoffeeScript project, whether you hate it or love it, it's been the main inspirator for JavaScripts advances. And second to CoffeeScript would be all the little libraries that inspired JS's standard library expansions like JQuery and Underscore.
- lucideer 8y agoI wasn't aware of any advances to JS made by Coffescript, what advances has it made? Do you have examples? You're right about jQuery and underscore, though I think jQuery's are often overstated (it and Sizzle inspired the querySelector API in browsers' DOM implementations, and not much else, underscore has had wide-ranging implications for ES6 in general)
- treve 8y agoProbably arrow functions?
- jherdman 8y agoThe fat arrow is the most obvious one that comes to mind.
- lucideer 8y agoI wasn't actually aware that was a Coffeescript first, I had the impression they started with -> and adopted fat arrows later with the advent of ES6, as I know fat arrows was in ES4, but you're right, Coffescript seems to predate even ES4. Good to know.
- tinco 8y agoAs 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.
- h1d 8y agoMaybe it gave the sense that compiling JS was worth it than sticking with plain JS.
- ggregoire 8y agoDo you really believe CoffeeScript's arrow functions (or whatever else) had a bigger impact than adding static types to JavaScript? CoffeeScript is mostly about shorter-syntax improvements, while TypeScript (or Flow) just changes everything… coding, debugging, refactoring, pushing code in prod with the assurance that it won't break…
- tinco 8y agoTypescript is not a part of Javascript yet. Maybe I underestimate the marketshare of Typescript, but CoffeeScript has improved Javascript everywhere by being the inspirator for ES6. And while I'd like to agree with you that having types in Javascript is more important than the coding comfort CoffeeScript brings, I still think ES6 was more important than Typescript is or will be. Before CoffeeScript coding in Javascript was at best annoying, and at worst absolutely terrible.