5 ms·
Yes, CoffeeScript, in 2009. Despite being a modest, fun experiment in stripping JavaScript down to a minimal skin, and without any corporate backing, it wound
by jashkenas 10y ago
Yes, CoffeeScript, in 2009.
Despite being a modest, fun experiment in stripping JavaScript down to a minimal skin, and without any corporate backing, it wound up catching on a little bit.
Thanks to the hard work of Geoffrey Booth and Simon Lydell, among others, there's a new "V2" version that includes many ES6 and 7 features that's almost ready to go: http://coffeescript.org/v2/ http://coffeescript.org/v2/
CoffeeScript was designed extremely conservatively. The goal was to stick close to JavaScript semantics, to avoid having a runtime, and to avoid features that would require gymnastics and overcomplications in the output, or would run noticeably slower than the raw JS equivalent.
These days, I'm most interested in trying something from the other end of the "political" spectrum: What would happen if you tried to make a web language that wanted to strip HTML, CSS and JavaScript down to their essence — but were extremely liberal in the techniques you used to get there?
I'd like to get a chance to give that a try some day.
- vortico 10y agoWhat are your personal opinions on the future of Coffeescript? It's still being used for Atom, but I've noticed colleagues are finally getting used to ES6 and similar languages and switching to them. I'm still stuck on Coffeescript though for all of my frontend projects. It's too closely aligned to my utopia of a language to try to find anything else (which would surely have a smaller following anyway).
- jashkenas 10y agoMy personal opinion is much as it has been from day one: > I'm not about to start using it for real projects, > it's really just a thought experiment about how nice > JavaScript could be with an alternative syntax. (Source: https://news.ycombinator.com/item?id=1014225 https://news.ycombinator.com/item?id=1014225) I've used it a bit for fun, but never for work. And I think that the future of JavaScript is probably always going to be JavaScript — until a web language comes along that's so compelling it's just obvious that it will be the right direction, and then the question won't even have to be asked. CoffeeScript, as a concept, was mostly finished back in the 2010-2011 days, as a layer on top of ES3. CoffeeScript 2, while a great step forward in terms of practicality for folks who want to use it with ES6 features like classes and modules — is also a step backwards for the notion of CoffeeScript: For example, we don't have to formalize classes anymore because JavaScript has them now, and unfortunately JavaScript has done them in a very static way that's not at all the direction CS would have taken. Ditto modules. As an open source project, it will continue to work just as well as it always did. But I definitely don't foresee a return to general relevance, ever.
- williamstein 10y agoFor what it's worth, I have been working on serious production coding projects using CoffeeScript full time for the last 4 years! Moreover, I like it a lot and have no plans to change to another language anytime soon. So thanks!
- ufmace 10y agoThanks everyone for this chain. I started up a new Rails project a few months ago and decided to stick with ES6 for the Javascript instead of Coffeescript. Part of what bothered me about Coffeescript is how difficult it seemed to be to find any recent activity of any type about it, plus how much it seems to have diverged from the feature set of ES6.
- jiyinyiyong 10y agoUsing at work even at major product in Teambition Shanghai https://github.com/teambition?language=coffeescript https://github.com/teambition?language=coffeescript https://github.com/jianliaoim?language=coffeescript https://github.com/jianliaoim?language=coffeescript
- STRML 10y agoJust wanted to say thank you for CoffeeScript. Despite its somewhat ambiguous syntax it really was a better version of JavaScript, and it would be fair to say it really mainstreamed the idea of JS as a target language. Many of the ideas in CS made it all the way to ES6. Many other ideas didn't make it to ES6 because CS fleshed out issues that quite possibly would have been missed otherwise. It was a huge net positive for web development. 2009-2011 were really heady times - a whole programming community emerged from a deep, dark cave with new tools and a new optimism for the web.
- gmac 10y agoDitto. CoffeeScript made JS almost Ruby-level fun for me. I've now switched mainly to TypeScript, which is also great (so many fewer runtime errors!). But I still miss thin arrow functions, array comprehensions, the existential operator ... What I really want these days is CoffeeScript on top of TypeScript.
- ng12 10y agoSame. Idiomatic Coffeescript was so much fun it gave me a borderline obsession with brevity. Array comprehensions also largely removed the need for lodash/underscore. Give me an optionally typed, ES6-flavored Coffeescript and I'll be a happy developer.
- gmac 10y agoAgreed, the brevity's the thing. As I felt moved to write in 2014: http://blog.mackerron.com/2014/10/29/great-coffeescript/ http://blog.mackerron.com/2014/10/29/great-coffeescript/ And, as you say, array comprehensions largely remove the need for each/map/filter etc, which also has potential for a nice performance boost.
- Osiris 10y agoI've never written CoffeeScript, but I agree that it had a significant impact on the evolution of the ECMAScript standard. A simple example, arrow functions, lexical scope (const, let), and `this` binding.
- emmanueloga_ 10y ago> What would happen if you tried to make a web language that wanted to strip HTML, CSS and JavaScript down to their essence — but were extremely liberal in the techniques you used to get there? So, extremely liberal, you said... :-) Thinking about this I started to wonder about other systems producing a similar output to the trio html/css/js. I realized PostScript is such a system, but for fixed size documents. People actually explored using PostScript for GUI applications in the past, as described in [1]. At some point I'd like to explore [2] and [3] to see if some of the ideas could be modernized and adapted for the web. 1: https://en.wikipedia.org/wiki/PostScript#Use_as_a_display_system https://en.wikipedia.org/wiki/PostScript#Use_as_a_display_sy... 2: https://en.wikipedia.org/wiki/Display_PostScript https://en.wikipedia.org/wiki/Display_PostScript 3: https://en.wikipedia.org/wiki/NeWS https://en.wikipedia.org/wiki/NeWS