Function calls

Nick Sabalausky a at a.a
Fri Jan 29 12:48:39 PST 2010


"Michel Fortin" <michel.fortin at michelf.com> wrote in message 
news:hjtpb4$1t17$1 at digitalmars.com...
>
> Andrei, you keep complaining it's a convention. It *is* a convention, 
> because only a convention can differentiate actions from accessors. 
> Ideally, we wouldn't need a special syntax: English words would be enough. 
> But as you know English words alone are often ambiguous.
>

It's more than just the existence of ambiguous english words. It's also that 
() vs no-() makes it far easier to tell at a mere glance whether or not 
you're looking at a function.

Imagine scrolling through a big chunk of code in a language that lacks 
optional-parens (and doesn't do any of that Java-style "getFoo()" crap). 
Without even reading a word of it, you quite literally *see* "function, 
function, value, value, etc." But with optional-parens (or those awful 
Java-style accessors), that gets thrown out the window and code needs more 
direct examination just to get the same amount of info out of it.





More information about the Digitalmars-d mailing list