From: Christoph Date: 2005-05-16T10:46:14+09:00 Subject: Re: Bug printing classes - Re: infinite number of singleton_classes David A. Black schrieb: > > I'm just not ready for: > > class << obj; def self.x; end; end > > to throw an error. It just seems like taking away too much > class-ness -- though obviously if the class interface to object > singleton behavior disappears entirely, that won't be an issue. I was kind of proposing to throw an error at the next level class << obj; class << self def self.x; end; end; end Disallowing the formation of the "singleton singleton class" of any type of class including "singleton classes" - this would effectively kill Ara's usage example > >> As a side note the class Klass lends itself naturally as the mother >> of all >> singleton classes - i.e. "pouch == Klass" - a problem with this idea >> is that >> we currently have Class < Module < Object. > > > I'm not sure what you mean. If every object's "pouch" is Klass, it > will get very crowded.... But I think I'm misunderstanding. Singleton classes could be instances of Klass, essentially Klass would be a subclass and "singleton class" of Class at the same time. This is similar (kind of the higher order version of) of Matju's proposed identification. class << Object; self end == Class /Christoph