Compile-time reflection

Kirk McDonald kirklin.mcdonald at gmail.com
Tue Jul 3 18:52:25 PDT 2007


Bill Baxter wrote:
> Julio César Carrascal Urquijo wrote:
>> Gregor Richards wrote:
>>> Time for a response without reading the entire message 8-D
>>>
>>> http://www.dsource.org/projects/tango.tools/browser/trunk/tools/rodin
>>>
>>> (FYI: Rodin will work with either Tango or Phobos)
>>>
>>>  - Gregor Richards
>>
>> Very impressive Gregor. 
> 
> Can someone post a synopsis for those of us too lazy to go sifting 
> through an svn repository?
> 
> --bb

It is a project in two parts:

drefgen is a utility, based on the DMD front-end and written in C++, 
which generates meta-data about whatever code you pass to it.

rodin is a D library which is capable of reading that meta-data, 
allowing client code (quite possibly the very code you generated the 
meta-data from) access to it.

While it is an impressive piece of work, the resulting data is not 
available at compile-time, just run-time. Therefore it is not quite what 
my post was talking about. It might be able to get there with some work, 
but I have an aversion to code generation. Actual support in the 
compiler would be vastly preferable.

-- 
Kirk McDonald
http://kirkmcdonald.blogspot.com
Pyd: Connecting D and Python
http://pyd.dsource.org



More information about the Digitalmars-d mailing list