[DGD] reflective programming under DGD

Noah Gibbs noah_gibbs at yahoo.com
Thu Jun 21 18:17:26 CEST 2007


  Generally it means that you can, at runtime, query the various properties of
your objects and types.  For example, one could query what type an object was,
and what functions were callable on that type, at runtime.

  C++ has extremely minor support for this (think RTTI), Java has somewhat
better support, and DGD can have support built by the MUDlib, as Felix points
out.  A few languages (Ruby comes to mind) have extensive support for both
reflection and metaprogramming (having functions write or modify other
functions and types at runtime).

  DGD can also do metaprogramming, but the most common method of doing it
involves recompiling objects rather than just saying "add this function to this
existing type".

--- Shentino <shentino at gmail.com> wrote:

> Pardon me for being an utter noob, but what in tarnation does "reflective"
> mean?
> 
> Not a term I'm familiar with, especially wrt. dgd.
> 
> On 6/20/07, Felix A. Croes <felix at dworkin.nl> wrote:
> > Carter Cheng <carter_cheng at yahoo.com> wrote:
> >
> > > I have been wondering if it is possible to do
> > > reflective programming under DGD? I figure this sort
> > > of thing could be quite powerful in perhaps helping to
> > > implement certain features like an incremental
> > > (object) garbage collector provided i had access to
> > > the variable list and the types of the variables and a
> > > way to reflectively load them.
> >
> > DGD does not support this directly.  What you could do is write your
> > own LPC-to-LPC compiler (others have done this, though typically as
> > a LPCish-to-LPC compiler) that preserves the information you need
> > for reflection.
> >
> > Regards,
> > Dworkin
> > ___________________________________________
> > https://mail.dworkin.nl/mailman/listinfo/dgd
> >
> ___________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd
> 






 
____________________________________________________________________________________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091



More information about the DGD mailing list