Newbie initial comments on D language - RTTI and run-time reflection
Edward Diener
eddielee_no_spam_here at tropicsoft.com
Mon Jan 28 18:08:21 PST 2008
Xinok wrote:
> Edward Diener wrote:
>> I have searched through the pdf documentation bit did not find a full
>> explanation of RTTI facilities in D. The reason I ask about this is that
>> it appears there is a 3rd party reflection facility but I do not see the
>> documentation in D that explains if and how reflection works in D. Does
>> it exist in D ? Is there documentation for it ?
>>
> D 2.0 is an experimental branch which supports compile time reflection.
> It's documented here:
> http://digitalmars.com/d/2.0/traits.html
That is compile-time reflection, which is useful for creating code but
not for instantiating objects at run-time and finding out about them. It
is also very limiting in the form presented as one can not instantiate
objects in the compile time constructs based on the information
returned, but just react in a way to the information found. I am not
putting down the effort as it more than duplicates and is more effective
than the Boost traits library, since it is based on compiler knowledge.
Is there any run-time reflection in D ? If not I would like to make a
strong argument for it on this NG and then let others comment on it or
at least have Walter see it. I realize implementing run-time reflection
in any language is exceedingly difficult, but my argument would make a
case for its importance in D if it could be done.
More information about the Digitalmars-d
mailing list