[Issue 16683] Lower typeid expression to .typeidImpl!(T)
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Nov 17 06:04:43 PST 2016
https://issues.dlang.org/show_bug.cgi?id=16683
Andrei Alexandrescu <andrei at erdani.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrei at erdani.com
--- Comment #1 from Andrei Alexandrescu <andrei at erdani.com> ---
To clarify, we want to lower occurrences of typeid(Xyz), where Xyz is a type,
to
.typeidImpl!(Xyz)()
Then we implement that function in object.d. For now we may leave other uses,
such as typeid(5), unchanged.
The advantage of this is that we shift implementation from the compiler
internals to the core runtime, which gives us more leeway. Also, the new
function being a template, it's not instantiated if not used which saves on
data. (Presumably the TypeInfo objects would be function-static.)
--
More information about the Digitalmars-d-bugs
mailing list