RT/CT Type

Paul Backus snarwin at gmail.com
Tue Apr 2 14:52:43 UTC 2019


On 4/2/19 8:38 AM, Alex wrote:
> Sure, but that isn't likely to happen and probably will be far more
> work. By simply having them convert to strings in RT helps a lot. When
> combined with CTFE and mixins it works well because one can go back and
> forth between type and strings.

You cannot, in the general case, go back and forth freely between types
and strings using `mixin`. Converting a type to a string discards all of
its context information, and there is no way to recover that information
from the string alone.

Example: https://run.dlang.io/is/EAzKUC

Even if this particular issue were fixed (getType could return a
fully-qualified name), there would still be the issue of Voldemort
types, which can *never* be mixed-in, even with a fully-qualified name.


More information about the Digitalmars-d mailing list