Skip to main content
David Refoua's user avatar
David Refoua's user avatar
David Refoua's user avatar
David Refoua
  • Member for 9 years, 4 months
  • Last seen more than a month ago
asked
Loading…
awarded
awarded
awarded
awarded
awarded
comment
awarded
awarded
comment
Why use parentheses for function call when no arguments are passed?
@DavidArno dude, that expression is just an example! Would changing it to if (expr.something().length > 127) make you happy? :D jk man
awarded
awarded
comment
Why use parentheses for function call when no arguments are passed?
Thanks, and you gave valid reasons as to why this is important. Can you also give some examples as to why language designers should use functions in prototypes, please?
revised
Loading…
comment
Why use parentheses for function call when no arguments are passed?
Please also read the update in my question.
revised
Loading…
comment
Why use parentheses for function call when no arguments are passed?
I'm fine with fun1( func2, 'test' ), but if we were to remove parentheses at all, I think func1 func2 'test' would be confusing as to which priority order should have been used.