Isn't __traits part of the language?
Steven Schveighoffer
schveiguy at yahoo.com
Fri Aug 6 05:53:08 PDT 2010
On Fri, 06 Aug 2010 08:42:40 -0400, simendsjo <simen.endsjo at pandavre.com>
wrote:
> Rationale (http://digitalmars.com/d/2.0/rationale.html) says:
> """Why not use operator names like __add__ and __div__ instead of opAdd,
> opDiv, etc.?
>
> __ keywords should indicate a proprietary language extension, not a
> basic part of the language. """
>
>
> But traits is explained under the language spec,
> http://digitalmars.com/d/2.0/traits.html.
>
>
> Can I expect traits to exist for all compiler implementations, or just
> dmd?
__traits was an experiment, one that is highly successful, and will likely
be a permanent part of the language.
It has been suggested that we choose a keyword to replace __traits, meta
was one such suggestion that I like. AFAIK, Walter hasn't really
commented on it.
-Steve
More information about the Digitalmars-d-learn
mailing list