Live data from Hacker News

CoffeeScript2 - A Redesign of the CoffeeScript Compiler

github.com

21–30 of 46 posts

Re: CoffeeScript2 - A Redesign of the CoffeeScript Compiler

#21

Very much looking forward to seeing how this turns out. To view a list of some of the public-facing things Michael wants to change, take a look here: https://github.com/michaelficarra/coffee-of-my-dreams

He wants to remove semicolons except where absolutely necessary? Is he nuts? The compiled output shouldn't be relying on an error-correction feature. Especially since it might break minifiers and validators.

I recognize the minifier significance. But wait, there are validators (!?) that choke on valid (!) syntax?

Re: CoffeeScript2 - A Redesign of the CoffeeScript Compiler

#23

Here is a relevant groupon blog post: https://engineering.groupon.com/2012/javascript/looking-forw... How about multiple backend support? Perhaps then someone could add a dart or NaCl backend.

I hadn't seen that blog post. Thanks for that.

Re: CoffeeScript2 - A Redesign of the CoffeeScript Compiler

#24

Earlier quoted context omitted.

I will suggest a few alternatives: Winescript, Caffèscript, Browniscript, Shortscript and Rubyscript.

The names I suggested were "CoffeeScript: Reloaded", "CoffeeScript Episode II: Attack of the Clones", "The CoffeeScript Supremacy", and "Live Free or CoffeeScript Hard". Technically, right now it's "CoffeeScript II: The Wrath of Khan". Jeremy suggested CoffeeScript Redux. That's probably the best choice, though a little boring.

Might I suggest "CoffeeScript II: Electric Boogaloo"?

Re: CoffeeScript2 - A Redesign of the CoffeeScript Compiler

#25

Forgive me for being skeptical, but it seems to me that CoffeeScript is going the way of Lisp: a language by hackers for hackers, with way too many incompatible implementations because each implementer has their own pet features that must be included.

Whoops -- I think you're missing a big part of the point of compiling into "standard" JavaScript. Not only is CoffeeScript code fully compatible with any JS library ... it's also compatible with code generated by any version of the compiler, and with code generated by alterna-compilers like Coco, and eventually this project as well. The semantic compatibility exists at the "plain 'ol" JS level.

[deleted]

Re: CoffeeScript2 - A Redesign of the CoffeeScript Compiler

#26

Forgive me for being skeptical, but it seems to me that CoffeeScript is going the way of Lisp: a language by hackers for hackers, with way too many incompatible implementations because each implementer has their own pet features that must be included.

Whoops -- I think you're missing a big part of the point of compiling into "standard" JavaScript. Not only is CoffeeScript code fully compatible with any JS library ... it's also compatible with code generated by any version of the compiler, and with code generated by alterna-compilers like Coco, and eventually this project as well. The semantic compatibility exists at the "plain 'ol" JS level.

That only solves part of the problem. It's still a big pain to have different syntax dialects and different tools that have to be used for different projects that are ostensibly written with the same language, even if they are compatible after you compile them to JS.

Re: CoffeeScript2 - A Redesign of the CoffeeScript Compiler

#28
post #20

Earlier quoted context omitted.

I'm not sure I agree that ASI is an "error-correction feature". Die-hard always-semicolon advocates certainly would like to paint it that way, but I think that may be rewriting history a bit.

The ECMAscript standard[1] and the creator of the language[2] are pretty clear about it. From what I know of parsing, anything phrased in terms of adding tokens post-lexing in order to make an invalid parse tree valid as opposed to encoding the semantics in the grammar itself is most definitely an error correction method. I think that a lot of the confusion comes from taking the term "error" personally. Nobody wants…

Fair enough, but a statement like "compiled output shouldn't be relying on an error-correction feature" is only (self-evidently) true if we're using the informal, taking-it-personally connotations of "error correction".

Re: CoffeeScript2 - A Redesign of the CoffeeScript Compiler

#29
The phrase "proper compiler-design principles" really gets on my nerves for some reason. It instantly makes me doubt the ability of the person saying it. It seems to say "I've heard of Lex/Yacc and once glanced at the Dragon Book".

Anyway, I gather the OP is a coffeescript core contributor, so my default opinion is probably wrong in this case, hopefully.

Post reply on HN