__FUNCTION__
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sat Feb 28 19:49:51 PST 2009
Christopher Wright wrote:
> Andrei Alexandrescu wrote:
>> grauzone wrote:
>>> For classes and structs, this is already possible: typeof(this).stringof
>>
>> Not outside of a member function. This is crippling my Visitor
>> implementation.
>
> I use it in static constructors. If it doesn't work, well, that's news
> to me.
>
> I don't know about "typeof(this) property;", though. I never tried it.
>
>>> Now we only need a way to get some kind of compile time object for
>>> functions and modules (like the type for classes/structs). Then you
>>> simply can use .stringof on them.
>>
>> There's much more to reflection that we need to define.
>
> Runtime as well as compile time.
Compile-time. Runtime follows and only needs a little glue.
Andrei
More information about the Digitalmars-d
mailing list