3 ms·
By this logic no language is a real language other than JavaScript, since as we've seen, you can make just about anything "simply compile down" to JavaScript.
by tolmasky 14y ago
By this logic no language is a real language other than JavaScript, since as we've seen, you can make just about anything "simply compile down" to JavaScript.
Let me put it another way. If I were to write a separate runtime that directly executed CoffeeScript (without JS as an intermediate step), would you then be satisfied that it is in fact a real language?
- michael_fine 14y agoNow that you say it, and I think about it more, I guess you're right. It does add features like list comprehension and pattern matching, and the compilation really is ambiguous.
- asynchrony 14y agoCoffeescript doesn't add pattern matching.
- michael_fine 14y agoCoffeescript has it, though it's formally called destructuring: http://jashkenas.github.com/coffee-script/#destructuring http://jashkenas.github.com/coffee-script/#destructuring
- jashkenas 14y agoAhem. That'd be "destructuring". http://wiki.ecmascript.org/doku.php?id=harmony:destructuring http://wiki.ecmascript.org/doku.php?id=harmony:destructuring
- riffraff 14y agodestructuring assignment is not really pattern matching, as the latter allows flow control and the former does not.