2 comments

[ 9.4 ms ] story [ 61.1 ms ] thread
This is abusive, not clever. Anything that forces you to code things as opaque string literals that get eval'ed is not a good idea. The next person to come along is going to wonder "what is this doing inside a string? what is r?" You also lose syntax highlighting and debuggability. Building the expression strings dynamically is going to be too tempting, and then you will have code generation and the potential for security issues. It's not even that much shorter than building the closure.
Agreed. As I see it, this actually limits the power of JavaScript rather than extending it.

Edit: I like to see people pushing and extending a language so I appreciate the author's effort... but I think it is misguided in this case.