TypeFunction example: ImplictConvTargets
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Wed Oct 7 00:03:46 UTC 2020
On Tuesday, 6 October 2020 at 23:44:30 UTC, Stefan Koch wrote:
> Type functions are actually just a shell around operations that
> would be illegal in the language as is.
> But because the type function provides a boundary I can do
> these things without invalidating the language semantics.
>
> Type functions are something which can be proven to not have
> influence on language semantics outside of their own function
> bodies.
Ugh, why not do it properly and just add type variables? It is
just a pointer... At runtime it could point to the type's RTTI
node which contains a pointer to the constructor.
More information about the Digitalmars-d
mailing list