jashkenas/coffee-script — Issue #1919: Alternative return this
Author: Qard
Created: 2011-12-08 00:00:59+00:00
State: open

My code has lots of dangling @ symbols to make stuff chainable, I've been wondering if there is perhaps a more elegant way to represent that.

How about rather than this;

->
# do stuff
@

we do something like this;

@-> # do stuff

That way you can see right at the start of the definition that it is chainable.