foo!(bar) ==> foo{bar}

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Oct 8 09:11:51 PDT 2008


Denis Koroskin wrote:
> On Wed, 08 Oct 2008 20:00:54 +0400, Andrei Alexandrescu 
> <SeeWebsiteForEmail at erdani.org> wrote:
> 
>> Alexander Pánek wrote:
>>> Steven Schveighoffer wrote:
>>>> "Alexander Pánek" wrote
>>>>> Steven Schveighoffer wrote:
>>>>>> Everything runs together, looks like one big word.  I think we 
>>>>>> need a full height character to represent template brackets, 
>>>>>> something with a lot of whitespace to separate it from the other 
>>>>>> characters.
>>>>> Heh... sounds like !() to me! ;)
>>>>
>>>> *gasp*  That's perfect!  I say we go with it ;)
>>>  Has my vote, for sure!
>>
>> One possibility to make progress would be to keep !( but allow 
>> omitting the parens when only one argument is being passed. That way 
>> many instantiations will be helped. For example, in wake of the 
>> impending demise of complex built-ins:
>>
>> Complex!double alpha;
>> Complex!float[] data;
>>
>> That way, again, we leverage the fact that an extra symbol is needed 
>> instead of compulsively requiring it in addition of the parens.
>>
>> One nice thing about this change is that it keeps all code as it is, 
>> just lifts one restriction.
>>
>> How about that?
>>
>>
>> Andrei
> 
> What is Complex!float[] - Complex!(float)[] or Complex!(float[])?

My intent is for ! to bind the tightest.

Andrei



More information about the Digitalmars-d mailing list