Reimplementing the bulk of std.meta iteratively
Stefan Koch
uplink.coder at gmail.com
Sat Sep 26 17:32:34 UTC 2020
On Saturday, 26 September 2020 at 16:40:47 UTC, H. S. Teoh wrote:
> On Sat, Sep 26, 2020 at 12:18:27PM -0400, Andrei Alexandrescu
> via Digitalmars-d wrote: [...]
>> The implementation uses throughout a reification/dereification
>> approach. To reify a type or alias means to convert it into a
>> value. To dereify a value means to turn it back into the type
>> or alias it originated from.
> [...]
>> Its weakest point is it uses .stringof for types, which has
>> issues with local types. Hopefully
>> https://github.com/dlang/dmd/pull/11797 could help with that.
> [...]
>
> This is awesome! I think dmd pull #11797 is the best way
> forward from our current state. It closes the
> reification/dereification loop, and allows CTFE manipulation of
> types as strings, which sidesteps the issues of how to
> manipulate types in imperative code without running into all
> sorts of problems like the ones that Stefan brought up.
>
#11797 is just a string mixin.
With all the constraints and problems.
Iff you can use a string mixin you can use __stringToType.
If you can't use a string mixin in the context you can't use
stringToType.
More information about the Digitalmars-d
mailing list