Property discussion wrap-up

Zach the Mystic reachBUTMINUSTHISzach at gOOGLYmail.com
Sun Jan 27 15:58:20 PST 2013


On Sunday, 27 January 2013 at 23:29:16 UTC, Timon Gehr wrote:
> In the absence of language rules, every sequence of characters 
> has an ambiguous meaning. It is only ambiguous to you because 
> you seem not aware of the rule that states that free-standing 
> function names are an alternative notation for argument-less 
> calls.

But I'm pretty sure more experienced people than myself had found 
points of ambiguity in what I'm talking about. Adam D. Ruppe had 
said something to that effect, and somebody said "typeof(foo)" 
which tripped Walter up, and I'm pretty sure it's because there 
really are cases of ambiguity when parentheses are made optional.

Also, strangely enough, people's use of the word ambiguity seems 
to be ambiguous. What _I_ mean by it is that the _compiler_ finds 
it ambiguous. I say "clear" if the reader of the program can 
easily understand what he or she is looking at, and "concise" if 
the given code is short.

If ambiguity in unused optional parentheses is a non-issue, I'm 
totally cool with that. In fact, that would be great, proving 
that optional parentheses are a sound design choice.

What I'm trying to do is make sure that there is no possibility 
for an ambiguous reading of an expression which silently passes 
based on some odd rule over which valid case should be chosen. My 
prototype for this is when the compiler issues an error for 
ambiguous repeated symbols found in two different modules. Error, 
not silence. If it simply doesn't apply here, then please, let me 
know.


More information about the Digitalmars-d mailing list