From: Christoph Date: 2004-05-30T00:26:19+09:00 Subject: Re: Metaobjects in Ruby David Alan Black wrote: >Hi -- > >"Sean Ross" writes: > > > >>"Claus Spitzer" wrote in message >>news:a7c2a81904052819266b9104b6@mail.gmail.com... >>[snip] >> >> >>>Now to start I was wondering if Ruby uses Metaobjects. If yes, where >>>is a good point to start gathering information on it? If not, which >>>are the facilities that Ruby uses to achieve reflection, >>>introspection, etc.? And again, where can I get more information on >>>it? >>> >>> >>[snip] >> >> >>Well, there's a chapter on Ruby "metaclass hackery" here: >> >>http://www.visibleworkings.com/little-ruby/Chapter3.pdf >> >> > >I know this sounds weird, but I don't think metaclasses are part of >metaprogramming or reflection. I think "metaclass", as used in the >pickaxe, is just a term for the singleton class of a Class object. (I >also seem to remember some sentiment on the part of Guy Decoux and >possibly others that the term isn't really necessary at all, but I >never got that discussion entirely straight. > > Well, the original post asked about meta Objects in Ruby so it seem natural that meta classes were mentioned in the thread (the provided link is does a pretty good job in explaining Ruby's meta class system IMO). Besides, a good understanding of Ruby's meta class system is certainly helpful (and probably necessary if you want to understand what you are doing) for meta programming anyway - irrespective of whether meta (singleton classes of) classes are part of Ruby meta programming or not. /Christoph