From: dblack@... Date: 2005-12-07T22:28:49+09:00 Subject: Re: injecting dynamic methods into a class Hi -- On Wed, 7 Dec 2005, Martin DeMello wrote: > David A. Black wrote: >> >> Natural selection isn't connected to what we're talking about. If you >> mean we should ignore Matz, or find a way to coerce him into changing his >> terminology to match a bunch of Google searches -- while, meanwhile, a lot >> of newcomers to Ruby suffer because of how cool people think their names >> for singleton classes are -- then I don't think you've got a sound or >> respectful plan. > > Note that the language itself doesn't call it *anything*. Indeed, there > isn't even an accessor for it, short of opening up its scope and > returning 'self'. I think that might change, though (I hope), once a long-term decision is reached about the name and for that matter the implementation (if it changes). > So this is not equivalent to, say, suddenly deciding > to call Hashes Dictionaries instead - indeed, it's more a jargon issue > than a ruby-the-language one. Sort of akin to <=> coming to be called > the spaceship operator, or #! the shebang line. Not quite: ruby -ve 'class << 3; end' ruby 1.9.0 (2005-05-20) [i686-linux] -e:1: no singleton class for Fixnum (TypeError) :-) Also, with Matz discussing it so much, I'd put it in the category of having official-name status. But I know what you mean about jargon. Just as people call objects "underlying thingies" and so forth, there's no particular reason for people not to use a term like "own class" or "eigenclass" (or "class a soi", if they want to translate it into yet another language :-) descriptively. It's just that the burgeoning usage and positioning of some of these terms have been unfortunate, in relation to the process already underway. David -- David A. Black dblack@wobblini.net "Ruby for Rails", forthcoming from Manning Publications, April 2006!