The Thermopylae excerpt of TDPL available online

Leandro Lucarella llucax at gmail.com
Fri Oct 30 07:16:05 PDT 2009


Lars T. Kyllingstad, el 30 de octubre a las 08:55 me escribiste:
> 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.

D is a system programming language. I don't see why one should be over
patronizing. It's enough to clarify what the keyword does in the
documentation. __gshared is not *that* rare, if you are interfacing with
C, every C global have to be __gshared, it just makes the code uglier for
no reason. Maybe it can be renamed to cglobal? I think we need a good
descriptive name so people can know what it's about, not an ugly
obfuscated one to confuse and scare them.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
I can't watch TV for four minutes without thinking
I have five serious diseases.
Like: "Do you ever wake up tired in the mornings?"
Oh my god I have this, write this down. Whatever it is, I have this.



More information about the Digitalmars-d mailing list