From: Trans Date: 2006-08-16T00:15:06+09:00 Subject: Re: nonce ts wrote: > >>>>> "T" == Trans writes: > > T> Well, I suppose to be exact the inside of the shirt should say > T> "pro-singleton" and the outside "anti-singleton" --that would be like > T> Ruby where there is on #singleton method, but under the hood there are > T> rb_singleton... refrences. But then nobody would see a "pro-singleton" > T> message on the inside of a shirt ;) > > This is because you don't want to see it > > moulon% ruby -e 'p Kernel.private_methods.grep(/singleton/)' > ["singleton_method_removed", "singleton_method_undefined", "singleton_method_added"] > moulon% > > Even ruby know what is a singleton class :-) > > moulon% ruby -e 'class << Object; self end.dup' > -e:1:in `initialize_copy': can't copy singleton class (TypeError) > from -e:1 > moulon% Yes, you're right. But it has been a slow "turning the shirt inside out" --differnt names had been used and there is still no direct #singleton_class method. And in anycase, I still think it's rather sad that another name can't be arrived at, so as to avoid terminology clash wtih "that other singleton". I mean, metaclass was abandoned becuase it was too general and virtual class because of a clash with those in C. Is it so hard to pick a name that isn't already being used? And it's not like it's a word being used in the pottery field or some other totally separate parlance. Singleton has meaning in this very realm: require 'singleton'. And besides that: http://7rans0noma.blogspot.com/2006/07/singleton-2-legion.html So maybe the whole "singly"' thing isn't so imparative. I've been thinking about the utiltiy of this "legionary" approach in prototype-based coding for instance. T.