[Issue 14964] __traits(isAlias, foo)

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jan 23 02:20:09 PST 2017


https://issues.dlang.org/show_bug.cgi?id=14964

Mathias Lang <mathias.lang at sociomantic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mathias.lang at sociomantic.co
                   |                            |m

--- Comment #2 from Mathias Lang <mathias.lang at sociomantic.com> ---
I would point to the spec here:
http://dlang.org/spec/declaration.html#AliasDeclaration

> `AliasDeclarations` create a symbol that is an alias for another type, and can be used anywhere that other type may appear.

> Aliased types are semantically identical to the types they are aliased to. The debugger cannot distinguish between them, and there is no difference as far as function overloading is concerned.

To me, it sounds like you are looking to create a subtype, in which case
`Typedef` would be a better approach. `alias` is just not designed for this.
This really sounds like a DIP to me.

--


More information about the Digitalmars-d-bugs mailing list