shouting versus dotting

Robert Fraser fraserofthenight at gmail.com
Sun Oct 5 23:12:46 PDT 2008


Vincent Richomme wrote:
> Michel Fortin a écrit :
>> On 2008-10-05 20:57:31 -0400, "Chris R. Miller" 
>> <lordsauronthegreat at gmail.com> said:
>>
>>> The !() syntax seems to serve only as a heads up that it's a 
>>> template. Otherwise (as far as I can tell) a simple foo(int)(bar, 
>>> baaz) would work just as well as foo!(int)(bar, baaz).
> 
> What about the ^ ? I think it's not worst than !
> 
> foo^(int)(bar) but maybe this symbol is already used by D ?
> Personally I would prefer to keep the C++, Java, C# syntax with <> 
> because people are used to it even if in some cases it looks like a bit 
> shift op.

The problem isn't what it looks like to people -- people will generally 
be able to discern a template instantiation/declaration from a bitshift. 
  The problem is what it looks like to the compiler. If we had this in 
the compiler, the compiler would need to resolve symbols before it was 
able to produce a full parse tree, which leads to slower compilation 
times, more difficult tool creation, and a whole slew of other problems.



More information about the Digitalmars-d mailing list