static map as a type function
uplink.coder at googlemail.com
Thu Sep 24 06:07:03 UTC 2020
On Thursday, 24 September 2020 at 05:51:30 UTC, H. S. Teoh wrote:
I've mentioned this before in one of Stefan's threads.
> Basically, to promote types to first-class citizen status, all
> we need to do is to treat typeid specially at compile-time. At
> compile-time, typeid becomes something like a glorified alias
> to the type itself, such that it can be manipulated, passed
> around, interrogated, etc.. At runtime, typeid becomes the
> familiar RTTI object.
Whether you call it `alias` or `typeid` you need the same
Infact type functions work in that way.
Just that type functions have some more functionality to take
care of more commonly needed meta-programming exercises.
I don't see where the difference is other than a syntactic one.
More information about the Digitalmars-d