From: Christoph Date: 2005-04-25T01:03:54+09:00 Subject: Re: [ANN] Article: Seeing Metaclasses Clearly gabriele renzi schrieb: >> > > I disagree, thinking that mixins and multiple inheritance are not the > same thing, and should not be pointed as such. I tend to agree with Mathieu that the semantically insistence that Ruby's mixins are NOT some kind of MI of presents itself as a language game to apiece the java kraut. On the other hand Ruby�s "Module mixin" relation is NOT transitive, making it strikingly different from (single or multiple) inheritance (see for example [ruby-talk:32007]) > >> The defining qualities of a Ruby class may be that: >> >> 1. a Ruby class is a direct-subclass-of a Ruby class using the "<" >> notation (except the Object class). >> >> 2. the Object class just happens to be the place where .new() is >> defined; and this is no matter how many classes use >> undef_method(:new) to forbid instantiation. > > > Is'nt it Class#new ? Mathieu might be nominally wrong, but he is right in pointing out that the current distinction between "meta Object" (the singleton class of the "Class" object "Object") and the class "Class" is just an artifact of the current implementation of Ruby�s Object model. Two or three years ago I even cooked up a semi working modification of the interpreter (translation: the resulting interpreter finished without crashing running a couple of simple scripts), such that "meta Object" == Class was true. The strongest argument against "meta Object" == Class are the current class relations Class < Module < Oject. To resolve this we could subclass both Module and Class from Object directly, or settle on relations Module < Class < Object Another possibility, would be getting rid of the class Module altogether, by either relying on full-blown MI or restricting the mixins to special "Module classes". Any of these alternative schemes have their shortcomings, but the current Class < Module < Object isn't flawless either. /Christoph