Hacker News new | ask | show | jobs
by crazygringo 5021 days ago
The thing that will really bite you is when you call a function:

    some_function arg_a
And then later on, decide it doesn't need an argument after all, and simply delete it:

    some_function
And then discover it doesn't work, because you have to remember to add the parentheses back in:

    some_function()
It's the little inconsistencies like that which keep driving you nuts... :)
1 comments

I just opt for parens every time. I really think they shouldn't ever be optional if in some cases they are mandatory. That this is a matter of personal style is somewhat frustrating.
I just use parens every time as well.

Remembering to call a function differently depending on whether it has arguments or not has been a common source of errors for me.

It's also much easier for me to parse the difference between "foo(bar(baz))" and "foo(bar, baz)" than it is for me to parse the difference between "foo bar baz" and "foo bar, baz"