From: dblack@... Date: 2006-01-09T07:20:31+09:00 Subject: Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? Hi -- On Mon, 9 Jan 2006, Gregory Brown wrote: > How can I best rephrase, rewrite, etc the definition to show that > reflection is a key tool for doing manipulation, not something that > does manipulation itself? I still don't have what I consider a complete fix on what we collectively mean by metaprogramming, but I think I'd say that Ruby's R&I facilities are preconditions of, or create a hospitable environment for, metaprogrammming techniques. For example: unless obj.respond_to?(meth) # R&I obj.singleton_class.class_eval { define_method(meth) &block # metaprogramming, arguably } end (using my favorite non-existent method, singleton_class :-) David -- David A. Black dblack@wobblini.net "Ruby for Rails", from Manning Publications, coming April 2006! http://www.manning.com/books/black