https://issues.dlang.org/show_bug.cgi?id=4527
Mathias LANG changed:
What|Removed |Added
Status|NEW |RESOLVED
CC||pro.mathias.l...@gmail.com
Resolution|--- |WONTFIX
--- Comment #2 from Mathias LANG ---
Closing as WONTFIX.
Rationale:
Aliases are defined as being "transparent". This is currently in the spec, and
what the compiler does. However people (including me) have come to expect
aliases to be retained while being transparent.
We added a bit of special-casing in the compiler to show 'string' when the type
is 'immutable(char)[]'. It didn't resolve the core issue, but it did mitigate
the problem.
However, typeid relies on the generated typeinfo. Having alias generate their
own typeinfo would bloat the binary to an impossible extent.
Bear in mind that aliases are used everywhere in the compiler, so
distinguishing between user-provided and compiler-generated aliases is a huge
undertaking. For example, the names of template parameter are aliases.
Putting aside the extremely negative impact it'd have on binary size, typeid is
not that used in modern D code, so I doubt the feature is more than a nice to
have nowadays.
--