TypeFunction example creatiing a conversion matrix

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Oct 1 13:53:53 UTC 2020


On Thu, Oct 01, 2020 at 12:27:23PM +0000, Stefan Koch via Digitalmars-d wrote:
[...]
> type functions do a Type -> TypeObject conversion when you pass the
> types in.
> inside the type function you get a "type-like" interface.
> But it has lost everything that made it a type.
> It has sizeof, alignof, stringof, tupleof, you can use __traits on it.
> But it cannot be used as a type anymore.
> Not inside a type-function anyway.
> 
> If you return a type or a type tuple from a type function, it becomes
> a regular type/type tuple again.

Isn't this just the same thing as Andrei's reification / dereification,
except redressed in terms of aliases?


T

-- 
MACINTOSH: Most Applications Crash, If Not, The Operating System Hangs


More information about the Digitalmars-d mailing list