Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
October 14, 2016 [Issue 4527] writeln/typeid to use string type names | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=4527 Andrei Alexandrescu <andrei@erdani.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |bootcamp CC| |andrei@erdani.com -- |
May 17, 2018 [Issue 4527] writeln/typeid to not expand aliases (for string types) | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=4527 Dmitry Olshansky <dmitry.olsh@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmitry.olsh@gmail.com Summary|writeln/typeid to use |writeln/typeid to not |string type names |expand aliases (for string | |types) -- |
January 16, 2020 [Issue 4527] writeln/typeid to not expand aliases (for string types) | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=4527 Mathias LANG <pro.mathias.lang@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |pro.mathias.lang@gmail.com Resolution|--- |WONTFIX --- Comment #2 from Mathias LANG <pro.mathias.lang@gmail.com> --- 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. -- |
Copyright © 1999-2021 by the D Language Foundation