Newbie initial comments on D language - RTTI and run-time reflection
Jarrett Billingsley
kb3ctd2 at yahoo.com
Tue Jan 29 20:32:49 PST 2008
"Edward Diener" <eddielee_no_spam_here at tropicsoft.com> wrote in message
news:fnor00$ib9$1 at digitalmars.com...
> Please, no one except a compiler itself parses source code anymore to
> build a reflection mechanism. If it is not in the compiler, asking a 3rd
> party mechanism to do it is really beyond the vast majority of
> programmers' ability. Sorry to be so negative but no other modern language
> of which I know, which has run-time reflection mechanisms, asks the
> programmer to go to such lengths. Look at .Net, Java, Python, Ruby, C++
> Builder, or Delphi and tell me which ones ask the programmer to parse the
> language just to reflect on the type and their sub-components.
Except that's exactly how those languages implement such things, and one of
the driving goals of D is to make it easy to parse and therefore easy to
write third-party tools for it. The frontend is open-source and there is in
fact a project on dsource (http://www.dsource.org/projects/dmdfe) which
provides the frontend in some kind of manageable form. Tools such as
rebuild already use this to parse D code.
Notice that .Net, Java, C++ Builder and Delphi are *aimed* at rapid app
development and are all supported by major corporations, so of course those
things are built in, and with Python and Ruby, such things fall out as a
consequence of how they are implemented. D is a systems programming
language aimed at making natively-compiled programs, so runtime reflection
isn't emphasized nearly as much. Generation of runtime reflection info is
not specified in the language spec, and therefore seems to me to be more of
a quality-of-implementation issue than anything.
More information about the Digitalmars-d
mailing list