nickfargo
At a glance I know that (comp f g h) and its flat list of arguments expresses a simple function composition chain. Seeing a #(f (g (h %))) where (comp) will do makes me sift through more parens; more than that though, when (comp) is embraced as convention, a #() is an immediate cue that simple function composition is not what's being expressed, which draws me in necessarily to examine the particular structure of the #() body.
Suggested reading: http://mrale.ph/blog/2015/01/11/whats-up-with-monomorphism.h...
Of course, but that means allocating a closure object per method per instance. When people say they want private variables, they mean they want them available in regular prototype-mounted methods. Proxies are one way ES6 lets you implement that. (Another is to use a WeakMap structure alongside a constructor, where each instance created by the constructor is mapped to a separate object that holds the "private" properties of that instance. Methods close over the WeakMap, but, crucially, are defined once on the constructor's prototype.)
ls -l /usr/local/bin/node
lrwxr-xr-x 1 502 staff 4 Jan 13 20:10 /usr/local/bin/node -> iojs
Is this necessary?By presenting Coffee's not-quite-idiomatic JS output as the counterpoint, the otherwise well made argument for Om's pleasantness is weakened.
pall = -> console.log line for line in arguments; return
would have done just fine there.One can be annoyed by `return` in tail position, or delighted by invocations-as-expressions. But not both. It's ok to choose the latter. :-)
Also, `console.log` is not a fit for map, forEach, et al. Check the parameters.
describe 'syntax after upgrading', ->
it 'should be even meatier', ->
expect parentheses.required
.toBe false
Very tidy.