Re:Move Lang
by jashkenas on Monday March 14, 2011 @10:22AM
(#2322563)
For the curious -- I was wondering what the initial example:
... compiled to as JavaScript. Here's the output, which you can reproduce by calling "move.compile()":
For comparison, here's what the same example in CoffeeScript:
... compiles to as JavaScript (which you can reproduce in the "Try CoffeeScript" console):
[ Parent
| on HN ]
Re:Move Lang
by itsnotvalid on Monday March 14, 2011 @11:19AM
(#2322808)
The very first part of it is really the injection of Move specific functions like 'repeat' and 'after'. It's just that they are injected as functions instead of being replaced directly in code.
Then it does the enabling of the ability of calling via hello 'x' or hello {name:'x'}, some syntactic sugar.
As my limited knowledge of coffeescript goes, you advocates on having the generated script as readable as possible, so these kind of sugar may irritate you ;-)