August 06, 2010 Isn't __traits part of the language? | ||||
---|---|---|---|---|
| ||||
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? |
August 06, 2010 Re: Isn't __traits part of the language? | ||||
---|---|---|---|---|
| ||||
Posted in reply to simendsjo | On Fri, 06 Aug 2010 08:42:40 -0400, simendsjo <simen.endsjo@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
|
Copyright © 1999-2021 by the D Language Foundation