keyword __traits
Daniel Keep
daniel.keep.lists at gmail.com
Sun Nov 11 18:15:13 PST 2007
Bill Baxter wrote:
> Robert Fraser wrote:
>> Frank Benoit Wrote:
>>
>>> When __traits was introduced, it was said, this will probably change
>>> again, and that "__traits" is ugly.
>>>
>>> So I want to bring that up again, as a remainder. And also I want to ask
>>> for suggestions.
>>>
>>> Why not simply have "traits" without the underscores as the keyword?
>>
>> I'm down with that. The main problem is identifiers named traits (in
>> particular, I believe std.traits, which may be used by quite a few
>> projects).
>
> There's the same issue with string and std.string. It works somehow.
>
> --bb
No, it's not; they're completely different. 'string' is an alias
defined in the standard library; it's not a reserved word. 'traits'
would be a reserved word, which will break anything that uses the word
'traits'.
Besides, I think Walter has said on a few occasions that __traits is for
internal library use; I think he wants to have a higher-level interface
exposed via a library, in which case, it doesn't matter what __traits is
called, since no one will be expected to use it.
-- Daniel
More information about the Digitalmars-d
mailing list