From: David Alan Black Date: 2001-12-22T06:14:19+09:00 Subject: [ruby-talk:29258] AdjectiveNoun class names (was: Re: Re: Why is UnboundMethod a subclass of alias_method) Hi -- On Fri, 21 Dec 2001, Yukihiro Matsumoto wrote: > For your information, it's almost historical reason. I developed > Method (BoundMethod) first, not knowing UnboundMethod was possible. > > If I was introducing both BoundMethod and UnbountMethod at the same > time, it might be > > Method > BoundMethod > UnboundMethod > > or might be as you said > > UnboundMethod > BoundMethod > > due to my less-class-ism. Picking up on something from #ruby-lang, which itself grew out of this: namely, the question of class names that have adjectives and nouns together. It came up on #ruby-lang when I made the comment that I don't like them :-) Whenever I see such a name, I always feel like there's a coupling that (ideally) shouldn't be there. The adjective part of the name feels like it's expressing something which should be an attribute, and/or should be in a module. I guess -- really just "thinking out loud", not claiming great cogency -- that in the case of ((Un)Bound)Methods, this would mean having things like: if m.bound? ... and such, which I know is very different but which feels better to me because it puts the weight on the behavior of the object rather than an adjective in the class name. I'm not (necessarily :-) lobbying for this to be rethought in this particular case, especially since I'm not very knowledgeable about this area. But out of general interest I'm curious whether other people have this reaction to names like this. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav