std.traits vcs __traits
Stefan Koch via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jan 16 03:54:23 PST 2017
On Sunday, 15 January 2017 at 12:53:04 UTC, Nordlöw wrote:
> Why is there both
>
> http://dlang.org/phobos/std_traits.html
>
> and the builtin
>
> https://dlang.org/spec/traits.html
>
> ?
>
> Should we modify std.traits to make use of __traits? I've
> noticed measurably faster compilations with __traits instead of
> std.traits for simple things such as isIntegral, isUnsigned,
> etc.
>
> If so, I'll happily make that happen!
There is a simple reason, you don't want complicated
type-introspection logic welded into the compiler.
The reason why std.traits it slow is because of inefficiencies
inside the template-system, which I intend to fix.
Therefore your efforts would be wasted.
More information about the Digitalmars-d
mailing list