From: Jordi Date: 2007-11-12T22:22:49+09:00 Subject: Re: method names in 1.9 On Nov 12, 2007 8:42 PM, David A. Black wrote: > Hi -- > > On Mon, 12 Nov 2007, Jordi wrote: > > > Summing it up: > > > > - Surprising or not, sending messages is not the same that calling > > methods in Ruby (there is a real difference, see method_missing email > > of Matthew in this thread). > > - Honoring visibility is not the same that don't honoring it (obviously) > > > > So, we can have potentially 4 operations in Ruby 1.8.x: > > > > 1.- Call method honoring visibility > > 2.- Call method not honoring visibility > > 3.- Send message honoring visibility > > 4.- Send message not honoring visibility > > I don't see how 1/2 differ from 3/4, except in the terminology. What > we call "calling a method" on an object *is* sending a message. > There's no choice on the programmer's part. The distinction is really > from the object's perspective. > As mathew pointed out in his message, the difference appears when method_missing is called in an object that receives a send message with the name of a missing method. Calling the method directly fails. So, for the four options I wrote before, what are the options logical/desirable for Ruby? Once you agree on that, how will that options called/implemented? I think that solving those two points will solve the discussion clearly for everyone. I'd suggest stick to ONLY sending messages, options 3 and 4 (object.method should be deprecated). Also I'd make a new more meaningful name for "send" and deprecate send for deletion in the next big release. > > > David > > -- > Upcoming training by David A. Black/Ruby Power and Light, LLC: > * Advancing With Rails, Berlin, Germany, November 19-22 > * Intro to Rails, London, UK, December 3-6 (by Skills Matter) > See http://www.rubypal.com for details! > >