Settings

Theme

My Perception of CoffeeScript

leongersing.tumblr.com

6 points by pkananen 14 years ago · 1 comment

Reader

allertonm 14 years ago

ISTM the author's "pure javascript" version of the horse/snake example is not solving the same problem as the CoffeeScript one.

In the CS code, the association between the object and it's type of motion (galloping/slithering) is made at construction time (via the implementation of "move" associated with the object), and in the "pure javascript" code it is made at the call site for "move".

This seems like such a fundamental difference that it becomes a little difficult to take the rest of the argument seriously.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection