From: dblack@... Date: 2005-12-07T14:23:46+09:00 Subject: Re: injecting dynamic methods into a class Hi -- On Wed, 7 Dec 2005, MenTaLguY wrote: > On Wed, 2005-12-07 at 06:32 +0900, David A. Black wrote: > >> -- 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. > > Plan? I'm just being realistic. Absolutely. As I said in my second or so post about this, the ship has sailed; it's obvious that, for whatever reason, singleton classes *are* going to be called all sorts of different things. I just think it's too bad. > I've been close to a few ill-fated open source projects where the > prevailing attitude was that insisting on anything different from what > the project founder specifies is disrespectful and destructive. That > attitude was deadly. Again (last time?), I'm not saying that nothing should change -- just that short-circuiting the discussion/decision process (which does exist, and which has a track-record of working well for Ruby) is short-sighted. I could, for example, set up a web page that described Ruby as an "item-oriented" language: everything is an "item", the class Object is misnamed but Matz hasn't stepped in to correct so I have to, etc. I could probably manage to confuse a few newcomers. But it wouldn't be good. (It's a hyperbolic example, but still.) > I've also been involved with a few projects (and cofounded one -- > Inkscape) which were wildly successful, growing organically and > developing broad communities. People were free to do their own thing, > and yet the project leaders were more respected. Sometimes things do > get messy and confusing, but in my experience, even those messy and > confusing things work out in the end. > > [ I'll leave it to others to decide which description better fits > Ruby. ] I don't think it's necessary to pigeon-hole Ruby philosophically. I just wish people would let Matz decide what these classes should be called. (And remember that Matz's style of deciding *includes* community input; by looking to Matz, I am not subscribing to some philosophy of centralized power [believe me :-].) It's really a rather circumscribed point. It's worth noting that a result of Matz's style of development, as well as the contributions of the community, there actually aren't very many things in the language that are vulnerable to this kind of treatment. Singleton classes seem to be the magnet for it. > I'm not a Taoist, but I think the notion of "striving-without-striving" > describes the necessary ethic nicely. Relax. This is not about control > or respect or disrespect or the Ultimate Fate of Ruby. Right -- it's about what to call singleton classes, and I wish people would discuss it and then let Matz decide. Maybe he'll decide that the best thing is arbitrarily many terms, and then lots of people will be a little bit happy :-) David -- David A. Black dblack@wobblini.net "Ruby for Rails", forthcoming from Manning Publications, April 2006!