Proposal: First class types (at compiletime)
Stefan Koch
uplink.coder at googlemail.com
Fri Jul 21 12:46:12 UTC 2023
On Friday, 21 July 2023 at 12:42:06 UTC, Commander Zot wrote:
>
> thx. but as i understand it, this is quite different then what
> i proposed, right?
> my proposal doesn't implement 'type functions' as a special
> kind of function, it just uses TypeInfo as a parameter and
> return type.
>
> so my idea would be to allow any type to implicitly convert to
> it's TypeInfo when a type is used in a expression.
> and any TypeInfo to be converted back to it's type when
> assigned to an alias.
> TypeInfo[] should be converted back to an AliasSeq of those
> types.
In order to convert TypeInfo[] into real types you need to build
special code into the compiler.
The information contained in TypeInfo[] is not by itself enough
to create a type.
All of the transformation on types or TypeInfo need to be
threaded through the compiler.
More information about the Digitalmars-d
mailing list