I applaud you for building something cool, but what are the "huge advantages" that you laud in the title?
I applaud you for building something cool, but what are the "huge advantages" that you laud in the title?
It has more than that. Check the buttons down at the bottom. It has switch statements that look for a true expression, preprocessor macros, sugar for appending to classes (like Objective-C's categories), sugar for shimming, and "nice functions" for avoiding callback hell.
That's a lot more than you get with literate CoffeeScript.
But I must say I found this link more informative http://coffeescript.org/#literate
See https://github.com/luciotato/waitfor ,node-fibers, and the same with generators: https://github.com/luciotato/waitfor-ES6
- if you have a "class Token" and later do "var token", the type is guessed by name affinity.
- if you do:
token = .getToken()
other = token
the type of "other" is guessed from assignment (:Token)2. Type annotations: you directly state type
var other:Token
var read: Token array
The compiler does a "pseudo-execution" of the AST, guessing types and validating property access.