Hacker News new | ask | show | jobs
by stickfigure 5022 days 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.
1 comments

I 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.