Newbie initial comments on D language - RTTI and run-time reflection

Walter Bright newshound1 at digitalmars.com
Mon Jan 28 21:35:47 PST 2008


Edward Diener wrote:
> I could go into the major usage of run-time reflection in modern IDE 
> environments but if I just say RAD programming, ala forms, components, 
> and design-time manipulation as in C++ Builder and later in Visual 
> Studio .Net, you can probably extrapolate where I am going with it. I 
> will just add that C++ as a a standard has been adamantly opposed to 
> such ideas, but from this programmer's point of view it will be the way 
> of programming in the future. Without real run-time reflection RAD 
> programming is nearly hopeless. That is the reason why implementing it 
> in D and working toward a RAD programming IDE using D would be a major 
> advantage and selling to using D over and above its additions and 
> possible improvements to C++ IMO. But I do realize how difficult adding 
> run-time reflection may be from the compiler's point of view.

I agree with the importance of RTR (runtime reflection).

But as Andrei and others pointed out to me, with good compile time 
reflection D can achieve runtime reflection with the addition of a 
simple call to a library.

What this does is enable RTR on an as-needed basis, as throwing it in by 
default for the whole program will produce executables that are perhaps 
2x the current size.



More information about the Digitalmars-d mailing list