From: Robert Dober Date: 2009-07-16T03:09:47+09:00 Subject: Re: Twelve rules of Ruby On 7/14/09, Joel VanderWerf wrote: > Rick DeNatale wrote: >> On Tue, Jul 14, 2009 at 11:46 AM, David A. Black >> wrote: >>>>> Objects don't "have" methods >> First of all, as you just stated, object DO in a sense have methods, >> in the same sense I have, say, an iPhone, because I know how to find >> it, usually. > > Yep. You said it better than I was about to (not just this line, but the > whole post). I was going to say "people don't 'have' bank accounts; they > have the intelligence to perform transactions by visiting a web site and > entering a password. > > As you say, the location of such intelligence is a question that can > wait until someone starts poking around in the interpreter. Probably. I feel that David is right, well I know he is, on technical grounds. However I also feel that Rick and Joël are right. I have made up a model in my mind that reads as follows: Objects have methods, but if you run into any troubles just remind that all those methods are stored in objects that happen to be modules and none in the object itself. Singleton methods are therefore stored in a singleton class which is not shared with any other object. Works for me ;). -- Toutes les grandes personnes ont d’abord été des enfants, mais peu d’entre elles s’en souviennent. All adults have been children first, but not many remember. [Antoine de Saint-Exupéry]