[D1] type of type
Steven Schveighoffer
schveiguy at yahoo.com
Thu Dec 30 07:37:17 PST 2010
On Wed, 29 Dec 2010 19:25:05 -0500, %u <e at ee.com> wrote:
> Is it not possible to have a "type" type?
In compile time, you can have type parameters with ease using templates.
During runtime, you can use the TypeInfo object, which is accessed via
typeid:
auto ti = typeid(int); // ti is TypeInfo type
See docs for TypeInfo in object.di
Now, the only issue with TypeInfo is that D runtime reflection is woefully
supported. You can't do much with a TypeInfo.
So again, what is it you want to do with the type type?
-Steve
More information about the Digitalmars-d-learn
mailing list