jashkenas/coffee-script — Issue #1978: Parameterless function calls without ()
Author: thedeeno
Created: 2011-12-27 04:41:41+00:00
State: open

I love how coffee script's sugar saves me from bracket soup. However, I still get a little ruby envy when I have to add () to my parameterless function calls so we know I'm actually calling the function and not referencing it. I think this can be fixed with the following syntax though:

// reference a function
foo#bar
or
foo.#bar

// call a parameter-less function
foo.bar

This seems technically possible and has the advantage of being additive and backward compatible.

I was looking at the code to see if I could make a patch but I'm new to the repo. Seems like a straight forward change that's a bit beyond me at the moment.

Thoughts?