From: Robert Klemme Date: 2005-04-04T23:04:43+09:00 Subject: Re: [EVALUATION] - E03 - jamLang Evaluation Case Applied to Ruby "Ilias Lazaridis" schrieb im Newsbeitrag news:d2rgtn$gaf$1@usenet.otenet.gr... > Robert Klemme wrote: > > "Ilias Lazaridis" schrieb im Newsbeitrag > > news:d2r96v$c9c$1@usenet.otenet.gr... > [...] > > >>I've understood now the problem. > >> > >>- > >> > >>The Ruby Object Model does not contain reflective MetaClasses, which > >>would enable to apply metadata even to methods. > > > > I'm not sure what exactly you mean by this. You can indeed access classes > > in Ruby. So I'd say there *are* MetaClasses. It's just that there is no > > persistent representation of methods which you could augment with > > additional data. > [...] - (some examples) > > ok, there are metaclasses, which are not fully(!) reflective (as already > showcased due to the missing possiility to recreate the class-definition). > > [E.g. Smalltalks object model is fully reflective (classes are instances > of metaclasses).] If that's the criterion I'd say that is indeed fully reflective: >> class Foo;end => nil >> Foo.class => Class >> Foo.kind_of? Class => true >> Foo.kind_of? Module => true >> Class === Foo => true >> Module === Foo => true >> Foo.class.ancestors => [Class, Module, Object, Kernel] In spite of that you cannot recreate a class definition because you cannot extract method bodies from the meta data. All you get is method names via #instance_methods and their arity. Does Smalltalk provide more? Cheers robert