News for hackers. Stuff that matters.
Re:CoffeeScript: The beautiful way to write JavaScript by jashkenas on Tuesday March 08, 2011 @02:59PM (#2302363)
Absolutely, but the idea here is a bit different. JavaScript is a language that we're stuck with for the entire foreseeable future of the web, for better or for worse ... and CoffeeScript is a conscious attempt to try and work within that limitation. Unless you're willing to take the significant performance hit of running an interpreter on top of JavaScript, you have to stick fairly close to JavaScript semantics.

That said, we certainly try to improve upon JS semantics, where it's possible to do so without a performance hit. Things like auto-lexical scoping, bound functions, chained comparisons and, most importantly, "everything is an expression", are all examples of this.

Re:CoffeeScript: The beautiful way to write JavaScript by davepeck on Tuesday March 08, 2011 @05:05PM (#2302773)
Interesting; I wasn't aware that CoffeeScript makes some semantic improvements too. Everything is an expression is truly value-add.
Re:CoffeeScript: The beautiful way to write JavaScript by neimado on Tuesday March 08, 2011 @09:11PM (#2303491)
No, you aren't trying to "improve JS semantics", you are trying to 'Rubyify' Javascript. You've created a language that is NOT javascript. Sorry, but no matter how hard you try to sell it as === javascript, it still will never be javascript. It's a Ruby syntax wrapped around javascript with some bells and whistles. It isn't a solution for javascript programmers, but it might be a solution for Ruby programmers.
Re:CoffeeScript: The beautiful way to write JavaScript by tianyicui on Wednesday March 09, 2011 @12:03AM (#2303895)
It might also be a solution for programmers who don't tend to label themselves "LanguageX programmers".
Re:CoffeeScript: The beautiful way to write JavaScript by zem on Wednesday March 09, 2011 @01:15AM (#2304080)
are you trying to say that automatic lexical scoping and everything-is-an-expression are not improvements to javascript semantics? so what if they're "rubyfying" it?