shouting versus dotting

Alexander Pánek alexander.panek at brainsware.org
Mon Oct 6 09:41:11 PDT 2008


Benji Smith wrote:
> Andrei Alexandrescu wrote:
>> I'd want to give it a try. How do others feel about Template{arguments}?
> 
> 
> At first glance, I like it better than !(), especially since it saves a 
> character, making nested templates much nicer:
> 
>    auto map = new Map{T[], List{MyType}}();     // not too bad
>    auto map = new Map!(T[], List!(MyType))();   // not too good
>    auto map = new Map<T[], List<MyType>>();     // still my favorite
> 
> It's too bad the shift operators can't be changed. Personally, I think 
> the angle brackets are more valuable as a matched pair of enclosures.
> 
> We could redefine the shift operators to be:
> 
>    -->  RIGHT SHIFT
>    <--  LEFT SHIFT
>    -->> SIGNED RIGHT SHIFT
> 
> And then the angle brackets could be coopted for templates.

No way! :(
’em pointed brackets are way too pointy. I like having parenthesis for 
templates.



More information about the Digitalmars-d mailing list