3 ms·
This is why our codebase uses paren-less calls when there is a trailing function argument, but uses parens in all other cases. It makes the code far, far more
by stickfigure 14y ago
This is why our codebase uses paren-less calls when there is a trailing function argument, but uses parens in all other cases. It makes the code far, far more readable.
- jaggederest 14y agoI agree, but I think making it a language restriction would be very odd. Coming from ruby, I also tend to think that this might be a nice way to do it, for things taking a final optional callback argument. $.ajax('path', options) (data) -> # do something with the data But it does read less clearly, unfortunately.