why __traits not in trait module and not name it trait
Daniel Keep
daniel.keep.lists at gmail.com
Wed Jun 24 20:12:13 PDT 2009
Sam Hu wrote:
> Yes,__traits did not stole my girl friend,but isn't better to name it trait? And I have thought I can find it in trait moudle but I was wrong.
It's not in a module because it's a keyword. You don't find "function"
defined in any library.
As for being called __traits instead of traits, I suspect that's for at
least one of two reasons:
1. so it won't invalidate existing code that uses the identifier
"traits", and/or
2. because it's not something regular programmers should have to use; it
should be used to build a higher-level API using templates.
More information about the Digitalmars-d-learn
mailing list