News for hackers. Stuff that matters.
Re:"Hello World" in Dart, compiled to JavaScript by geon on Tuesday October 11, 2011 @08:16AM (#3098229)
I'd say the gist demonstrates that it's not Javascript. What you see is the entire runtime, compiled to naive js.

If anything, Coffeescript is "just" js with syntactic sugar. Not that there is anything wrong with that.

Re:"Hello World" in Dart, compiled to JavaScript by cubicle67 on Tuesday October 11, 2011 @09:29AM (#3098443)
that's a really interesting comment. where exactly is the line drawn between "just syntactic sugar" and "a different language"?

Here we have two ways of expressing code, coffeescript and dart. Both are syntactically quite different from js, both offer features not found in js, both encourage you to write code differently to how you would in js and both compile to plain js.

Re:"Hello World" in Dart, compiled to JavaScript by geon on Wednesday October 12, 2011 @03:05PM (#3104065)
> where exactly is the line

Not that I have an aswer to that, but I have the impression Coffeescript was designed specifically to compile 1:1 to matching js.

A lot of the distinction seems to depend on the local culture of the language. I've seen a lot of lispers talking about their new "language", where they add some minor feature to scheme.

Re:"Hello World" in Dart, compiled to JavaScript by cubicle67 on Thursday October 13, 2011 @04:57AM (#3106639)
...Coffeescript was designed specifically to compile 1:1 to matching js

possibly initially, but there's a lot of constructs in coffeescript that aren't in js eg existential operator

    solipsism = true if mind? and not world?
compiles to

    var solipsism;
    if ((typeof mind !== "undefined" && mind !== null) && !(typeof world !== "undefined" && world !== null)) {
      solipsism = true;
    }
see also splats http://jashkenas.github.com/coffee-script/#splats, function binding and comprehensions over collections eg

    eat food for food in ['toast', 'cheese', 'wine']