Live data from Hacker News

Replace CoffeeScript with ES6

robots.thoughtbot.com

151–160 of 178 posts

Re: Replace CoffeeScript with ES6

#151
post #32
post #29

Earlier quoted context omitted.

I don't set up a "build pipeline" until I'm sure the app is going to deployed to a production environment. Why would I set up a build for what is essentially a fiddle, or if I'm just experimenting? The now-common workflow where people write build scripts at the start of a new project is just bizarre to me.

Sure, and why do people use C anyway? You can write binary directly without any kind of make utility.

Probably because machine code is not very human comprehensible.

Re: Replace CoffeeScript with ES6

#152

Folks, this was always part of the plan ;) CoffeeScript is a fun little experiment in what's possible when you take JavaScript semantics and try to boil down the user interface to a minimalist surface. But JavaScript will always keep on rolling onwards — and to the extent that future versions of JavaScript take any minor inspiration or reference or overlap with things that CoffeeScript already does, the more the bett…

Only five years ago since the original announcement: https://news.ycombinator.com/item?id=1014080

> * CoffeeScript is an attempt to expose the good parts of JavaScript through syntax that favors expressions over statements, cuts down on punctuation noise, and provides pretty function literals.

Re: Replace CoffeeScript with ES6

#153
post #137

CoffeeScript syntax is better and cleaner than the ES6 syntax. It's a fun language, and I've been using it everyday since it came out. On small projects, it's top-notch. But the future of CoffeeScript is bleak because many software designers are beginning to understand the value of type systems, e.g. TypeScript and Flow, for building maintainable Javascript code bases, and this means CoffeeScript is out of the pictur…

Variable shadowing sounds like a hacky way to solve problems caused by function scoping, which is solved in ES6 by introducing lexical scoping (i.e. the same scoping rules as in every other language). It's also worth pointing out that CS and ES6 aren't really comparable technologies. ES6 isn't some newfangled preprocessor that simplifies syntax, it's an update to the standard which JS adheres to. CS is fundamentally…

>> which is solved in ES6 by introducing lexical scoping I thought JS has always had lexical scoping. What's new in ES6 allowing variables to have block scope.

Re: Replace CoffeeScript with ES6

#154

CoffeeScript syntax is better and cleaner than the ES6 syntax. It's a fun language, and I've been using it everyday since it came out. On small projects, it's top-notch. But the future of CoffeeScript is bleak because many software designers are beginning to understand the value of type systems, e.g. TypeScript and Flow, for building maintainable Javascript code bases, and this means CoffeeScript is out of the pictur…

Speaking of putting away childish things (like effect-ridden, imperative spaghetti code), PureScript is my new CoffeeScript.

http://purescript.org

Re: Replace CoffeeScript with ES6

#155

Earlier quoted context omitted.

Firefox and IE11 already natively implement a majority of new ES6 features, and Chrome is getting there: http://kangax.github.io/compat-table/es6/ The main laggard for now is Safari/WebKit.

Current stable browser versions: FF 35: 60% Chrome 40: 35% Safari 8/Mobile: 22% IE11: 21%

Oops, yeah. I wrote "IE11" but I meant "IE TP".

The dev versions of IE/Firefox/Chrome/WebKit are up to 70%/69%/48%/28% respectively.

Re: Replace CoffeeScript with ES6

#156

CoffeeScript syntax is better and cleaner than the ES6 syntax. It's a fun language, and I've been using it everyday since it came out. On small projects, it's top-notch. But the future of CoffeeScript is bleak because many software designers are beginning to understand the value of type systems, e.g. TypeScript and Flow, for building maintainable Javascript code bases, and this means CoffeeScript is out of the pictur…

Speaking of putting away childish things (like effect-ridden, imperative spaghetti code), PureScript is my new CoffeeScript. http://purescript.org

I've been looking into that myself, but then I found Elm[0] and stopped looking. :)

-------------------

[0] elm-lang.org

Re: Replace CoffeeScript with ES6

#157
The body of the post doesn't support the title's recommendation. Each section shows how ES6 either has an equivalent feature to CoffeeScript, or almost does; in other words, it is approaching feature parity.

To replace one tool with another, you need a compelling reason...and "it's almost at feature parity" is not that.

Re: Replace CoffeeScript with ES6

#158

Earlier quoted context omitted.

Speaking of putting away childish things (like effect-ridden, imperative spaghetti code), PureScript is my new CoffeeScript. http://purescript.org

I've been looking into that myself, but then I found Elm[0] and stopped looking. :) ------------------- [0] elm-lang.org

Oh, Elm is cool. I get that. So is Haste[0].

But I think PureScript is a more practical choice for targeting JavaScript. (It generates much smaller, more readable output, for one thing.)

I don't promise to have my mind made up, though. I'm still furiously taking in all of this Haskelly stuff, and it looks like a pretty long road ahead.

I've been telling people that I feel like I've crawled into a tunnel, and can't back out again. I seem to have no choice but to keep crawling towards that tiny beam of light.

I don't know how many times I'd looked at the ML family, and just couldn't appreciate it immediately enough... but somehow I've managed to become completely obsessed, to the extent that anything less really turns my stomach.

[0] http://haste-lang.org/

Re: Replace CoffeeScript with ES6

#159
post #106

There is very few features of ES6 that are not syntax sugar. Those features will be (or already are) ported to CoffeeScript. And the CoffeeScript sugar is just tastier. ES6 syntax is kind of CoffeeScript for people who hate meaningful indentination and it's quite decent for that purpose.

> There is very few features of ES6 that are not syntax sugar. (Weak)Map, (Weak)Set, Symbol, Generators, Promises, Modules, Proxies... these aren't sugar.

So generator, weak references and proxies.

Promises, modules we already had. Native implementation doesn't provide new functionality, just picks winners.

I'm really excited by generators and proxies but those are available in latest version of CoffeeScript already.

Re: Replace CoffeeScript with ES6

#160
post #50

The reason that I like CoffeeScript is that it removes, what I consider, the unnecessary boilerplate of JavaScript and replaces it with a shorthand equivalent and good conventions. I feel that CoffeeScript is better at representing the intent of JS than JS. I can visually sift through CoffeeScript and understand the code much quicker than normal JavaScript, which in my opinion leads to more maintainable code. I'm not…

My biggest problem is definitely the source maps. It took me forever to get them to "work" and while the stack traces are mostly correct, they're often off by a line number or two. This makes debugging ridiculously hard when the line numbers are just "close". I know this might not sound like a big deal in the grand scheme of things, but I also don't think CoffeeScript really improves on js all that much, so the annoy…

That sort of thing completely killed any interest I would have had in CS. When it came about I already knew JS really well and the benefits of CS just seemed too minimal for learning a new language and dealing with bugs like that.
Post reply on HN