by jashkenas · 9y ago · 0 comments
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/
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.
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.
Give me an optionally typed, ES6-flavored Coffeescript and I'll be a happy developer.
And, as you say, array comprehensions largely remove the need for each/map/filter etc, which also has potential for a nice performance boost.
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_sy... 2: https://en.wikipedia.org/wiki/Display_PostScript 3: https://en.wikipedia.org/wiki/NeWS
> 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)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.