Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

meta.nameof module

Moderators: kris

Posted: 07/06/07 12:36:39 Modified: 07/06/07 12:39:41

Hello, Is there a reason for which this module was removed some time ago from tango? The commit log states that features provided by this module are supplied by the compiler (stringof), some are, but most of the real useful ones are not covered, or I was unable to discover them. Some of the examples are: qualifiednameof prettytypeof prettynameof

I believe that this module should still exist as it provides some help for people trying to handle compile time reflection and not having additional dependencies outside tango will be nice.

Radu

Author Message

Posted: 07/06/07 21:39:35

CTFE rendered much of tango.util.meta obsolete, and we decided to remove it. Regarding nameof specifically, I believe it was a bit out of date, and .stringof was expected to fill the gap. Are there explicit things you want to do that .stringof can't handle (I believe it may not handle function parameters, for example)?

Posted: 07/07/07 10:05:31

You are right nameof is outdated as some corner cases don't work anymore because of manglig changes in the compiler. I use this module for getting symbol qualified names (function aliases and types) and stringof didn't help. If the functionality of nameof can be replicated using new compiler constructs then great, as I've said it helps people like me and having it provided by tango means no more dependencies on outdated libraries.

Thanks, Radu