[plt-scheme] Reflection in class.ss

From: Noel Welsh (noelwelsh at yahoo.com)
Date: Wed Mar 28 12:14:02 EDT 2007

I'm trying to get the value of an object's field given the field's name.  The OO system (class.ss) provides get-field, but the field name is not evaluated, and so must be a literal.  This is not sufficient use -- I have a list of names and want to lookup the value at runtime.  Can this be done?  If not, can the OO system be extended to support it?  This kind of metaprogramming is useful for a great many cases.

Email: noelwelsh <at> yahoo <dot> com   noel <at> untyped <dot> com
AIM: noelhwelsh
Blogs: http://monospaced.blogspot.com/  http://www.untyped.com/untyping/

Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.

Posted on the users mailing list.