From: james@... Date: 2002-04-10T11:15:26+09:00 Subject: RE: OO/Ruby Terminology > From: bbense+comp.lang.ruby.Apr.07.02@telemark.stanford.edu > [mailto:bbense+comp.lang.ruby.Apr.07.02@telemark.stanford.edu] > Sent: Tuesday, April 09, 2002 6:30 PM > To: ruby-talk ML > Subject: Re: OO/Ruby Terminology > Importance: High > > > -----BEGIN PGP SIGNED MESSAGE----- > > In article , > wrote: > >I added a wiki page for Ruby book development ... > >http://www.rubygarden.org/ruby?RubyBookDevelopment > > > >.. and I have a related question. What terminology should one use when > >explaining Ruby & object-oriented programming? It's common to > see people > >describe this: > > > >Foo.bar( x ) > > > >as "calling Foo's bar method," though a Smalltalker might describe it as > >"sending a bar message to Foo." > > > >Does one or the other encourage a frame of mind better suited (or > >detrimental) to fully understanding, and making use of, Ruby? > > > > I am certainly not an object guru, but to me there has always > been a distinction between the two forms. > > "calling Foo's bar method" > > implies calling a class method with no instance of the object. > > "sending a bar message to Foo" > > would be wrong to me in this case since there is no instance > of the class to message. I'm not sure if anyone else thinks > this way, but it's what makes sense to me. I should have been more clear, and used explicit Ruby code rather than GenericOOLangauge code (which looked like Ruby code). Given this Ruby code: my_foo = Foo.new my_foo.bar A reader learning OO and/or Ruby would be better served if this were described as: 1) Sending the message bar to my_foo 2) Calling my_foo's bar method. James > > - - Booker C. Bense > > > > -----BEGIN PGP SIGNATURE----- > Version: 2.6.2 > > iQCVAwUBPLCvAgD83u1ILnWNAQGX1wP/Rhbe9oE+U78uwnWwH1ixeUiRvDgc3wLP > YZnQS0mdmqeqv7sTnqu1dZ8u5iR/EPLtpMV1dcKNB8WbBZODpnqsjKv8vAI6LW4+ > G+xJfcLegOyPPn3kuSHuxImZqooHBTUQ/qe7+qF96w4rvjv3VDXpj4M4/w3wpTVB > kZDKy4S/5kQ= > =YA5e > -----END PGP SIGNATURE----- > -- > > >