The Thermopylae excerpt of TDPL available online

Lars T. Kyllingstad public at kyllingen.NOSPAMnet
Fri Oct 30 00:55:09 PDT 2009


Leandro Lucarella wrote:
> Walter Bright, el 29 de octubre a las 16:06 me escribiste:
>> Lars T. Kyllingstad wrote:
>>> What I cannot for the life of me understand is WHY the double
>>> underscores? What's wrong with just "traits"?
>> Because D needed the feature, and it wasn't clear what a good syntax
>> for it would be. So __traits is a "put something out there, make it
>> work, if it proves its usefulness and a good syntax for it appears,
>> then that can be adopted."
> 
> And now, being moderately close to D2 stabilization, isn't a good moment
> to think about a better syntax or just live with traits() as it is (but
> without the leading __)?
> 
> Same for __gshared.


I'm not convinced about __gshared. As far as I've understood, __gshared 
is a "don't use this unless you know what you are doing" feature. As 
such, it should probably be a bit ugly.

__traits(), on the other hand, is more of a "hey you guys, you should 
try this traits thing, it's totally neat" feature.

-Lars



More information about the Digitalmars-d mailing list