I've always secretly hated the ambiguity in D's syntax. E.g:

foo.bar

What could foo and bar be? D has many more answers than C++:

                    D           C++
                    foo bar     foo bar
Module/Namespace    x   x
Type                x   x
Variable            x   x       x   x
Method                  x
Free function       x   x

For this reason I initially agreed with Nick Sabalausky on disallowing calling non-property functions without parenthesis.

...but now I'm thinking that this ambiguity stops being an issue once we have an IDE that can render different things in different colors (or different fonts or with other visual cues if you're color-blind). Color is a much stronger and faster visual cue than having parenthesis at the end of a name. For this reason, I think that it's fine to allow non-property functions to be called without parenthesis. But I still think that property functions should not be allowed to be called with parenthesis.

Reply via email to