From: "David A. Black" Date: 2005-12-01T03:09:03+09:00 Subject: Re: ClassMethods: Module creation hook / Capitalized method Hi -- On Thu, 1 Dec 2005, Trans wrote: > > David A. Black wrote: > >> But I'm personally not a big fan of just asserting >> that something is a class method when that's really not the right term >> for it. (I have the same problem with the ClassMethods module >> technique. It works by a kind of consensus, but I don't consider it >> an optimal naming scheme.) > > Well ask Nodu about it, AFAIK he was the originator of the idea: > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/35979 OK: Nobu, don't you think there's a distinction between class methods that are defined on one particular class, and methods that are defined as instance methods in another context and made available to many classes via a module? :-) I think it's partly a matter of there not being a language-level definition of "class method" (which is actually OK with me). If there were, I would tend to equate it with MyClass.singleton_methods(false), rather than MyClass.singleton_methods. Maybe that's an artificial distinction, though, from the perspective of the user. Come to think of it, it's a bit odd that there's such a thing as an object's "singleton" methods that aren't defined in the object's singleton class. Maybe that's the lump under the carpet that doesn't seem to want to disappear in all of this. David -- David A. Black dblack@wobblini.net