Compiler patch for runtime reflection

Robert Jacques sandford at jhu.edu
Tue Oct 25 07:41:11 PDT 2011


On Tue, 25 Oct 2011 09:40:47 -0400, Jonny Dee <jonnyd at gmx.net> wrote:
> Hi,
>
> I would love to see runtime reflection be available in D. I am currently reading Walter Bright's "The D
> Programming Language" and with every page I read I became more and more fascinated and enthusiastic
> about D. But then I started to wonder why I haven't read about runtime reflection yet, so I did some Internet
> research and was a bit disappointed this feature isn't available. D is really cool, it's not only C done right,
> but also Java and C#. Actually, to me, it's one of the best programming language available yet. It's really a
> pitty RTTI is not available. So I hope your approach will somehow influence D's future :)
>
> Keep going,
> Jonny

Hi Jonny,
Well, some RTTI is available. How much RTTI is needed, really depends on what you're trying to do. Therefore whether D has or hasn't got RTTI depends heavily on what any particular person means by RTTI. Do you have some use cases in mind? Maybe prototype objects, duck-typing/casting or serialization? Or perhaps something you wrote?

Sorry for all the questions, but I feel as if we don't have a resident reflection expert in the dialog, or even the opinions of basic/experienced users. We all know that 'RTTI' is good, but we're a little vague on the how and why. (Well, beyond the use cases above)


More information about the Digitalmars-d mailing list