3 ms·
Handy, but I don't see the point in this being anything to do with CoffeeScript until it's an extension to the syntax itself. It currently seems to be a simple
by udp 15y ago
Handy, but I don't see the point in this being anything to do with CoffeeScript until it's an extension to the syntax itself.
It currently seems to be a simple addition to the Function prototype for Javascript, and happens to be written in CoffeeScript (why for something so small I've no idea).
- raganwald 15y ago> I don't see the point in this being anything to do with CoffeeScript until it's an extension to the syntax itself. The included .js files will work just fine in JavaScript. So you’re right about that. But we are talking about convenience methods and the aesthetics of code, as opposed to some infrastructure functionality (like an async library) or domain-specific functionality (like a state machine mixin). It’s just a feeling on my part, but it makes much more sense to me in CoffeeScript than it does in JavaScript. It’s easier to write anonymous lambdas in CoffeeScript, so it’s cleaner to use .K and .T in CoffeeScript than if I have to encumber a line of code with braces and return keywords. I wrote jQuery Combinators in old-fashioned JavaScript, so I can’t really dispute your suggestion, just share why I wrote it to appeal to CoffeeScript users.