From: David Alan Black Date: 2002-04-11T06:27:25+09:00 Subject: RE: OO/Ruby Terminology Hello -- On Thu, 11 Apr 2002 james@rubyxml.com wrote: > > > This is where I see a chance for confusion. Message != method. > > > Ruby objects can respond to arbitrary messages in a variety of > > ways, and > > > yet the object may have no corresponding method. > > > > I'm not sure this is germane in an introductory OO course. I tend to > > think not. > > Interesting. I would think that this distinction should be made early on, > so that mental habits don't need to be undone later on. Sun's OO tutorial > discuses messages early on > (http://java.sun.com/docs/books/tutorial/java/concepts/message.html), yet > most Java documentation (books, articles) I see rarely use that > terminology. Even Sun. > > I suspect this is because the compiler forces instance.message to mean > instance.method, so, by and large, there's little reason to consider the > distinction. I guess that in a very pure case, where someone only needed to know how to use existing libraries, they could exclusively learn that they need to send messages to objects, without knowing anything about methods.... but that case is probably too "pure" to exist :-) Once someone is creating their own classes, they'll be writing methods, and then the connection will be manifest. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav