News for hackers. Stuff that matters.
Re:JavaScript is Not Web Assembly by artsrc on Wednesday September 14, 2011 @07:21PM (#2998247)
A compiler that did an 'identity compilation' on a strict subset of real JavaScript, and rejected any problematic or confusing constructs would have value.

CoffeeScript goes further than that and provides different syntax.

One of the things that complicates C++ is the requirement for source code compatibility with C. This necessarily requires preservation of confusing quirks.

CoffeeScript is not source code compatible with JavaScript.

Re:JavaScript is Not Web Assembly by IsaacSchlueter on Thursday September 15, 2011 @02:31AM (#2999101)

    A compiler that did an 'identity compilation' on a strict 
    subset of real JavaScript, and rejected any problematic 
    or confusing constructs would have value.
It would. But it would be a linter, not a compiler.
Re:JavaScript is Not Web Assembly by SimHacker on Thursday September 15, 2011 @08:44AM (#3000041)
It would only be a linter if it weren't a compiler. If it compiles language X to language X, it's a compiler. Because it compiles. Rule of thumb: if it compiles, it's a compiler, not a linter. Simple. Like ducks.
Re:JavaScript is Not Web Assembly by marshray on Thursday September 15, 2011 @03:21PM (#3001736)
What if it compiles language X to language Y, where Y is the union of all the valid programs in X with a set of possible descriptive error strings?
Re:JavaScript is Not Web Assembly by Rusky on Wednesday September 14, 2011 @07:57PM (#2998343)
Correct. That doesn't make CoffeeScript->JavaScript like C->assembly. In fact, it supports the idea that it's like C++->C. C++ provides stronger type checking than C and provides different syntax for things like constructors, heap allocation, etc.
Re:JavaScript is Not Web Assembly by artsrc on Thursday September 15, 2011 @12:30AM (#2998918)
CoffeeScript->JavaScript is a little like C++->C but it is more like Eiffel->C because CoffeeScript makes no attempt to compile any valid JavaScript.

This is important because C++ is damaged by the attempts to provide C source compatibility.