From: dblack@... Date: 2006-07-08T11:48:34+09:00 Subject: Re: About 1.9 #__method__ feature. Hi -- On Sat, 8 Jul 2006, Sean O'Halpin wrote: > [snipped shameless self-promotion ;)] Hey, I'm just the messenger :-) > OK - I think I get what you're saying now. I'll try to paraphrase (and > please correct me if I get this wrong). > > Because in Ruby ~everything~ is an object then ~every~ method > (function, procedure) call is a message sent to an object. Therefore > there is no such thing as a receiverless method, whether or not that > receiver is explicitly specified or implicitly assumed. > > So really the distinction is between implicit (unspecified) and > explicit (specified) receiver. > > Is that the point you're making? If so, I wholly agree. Yes, essentially. And that an implicit/explicit receiver is a matter of actual code. > By the way, I think you and Ara are saying the same thing but in > different ways. ;) I actually don't think so. I think we have a pretty different take on what: obj.send(:meth) # or funcall or whatever means. My understanding is that Ara sees "receiverlessness" as the master or "hub" condition that defines the invocation of a private method -- so that even if there's no method call, lexically, it's still meaningful to refer to there having been a "receiverless method call" if one can demonstrate that a private method has been executed. By contrast, I see implicit-receiver method calls as one way to gain access to private methods, and a programmatic/symbolic facility like "funcall" as a *different* way to the same end. When I see this: obj.funcall(:meth) I know that a private method may be executed, but I don't consider the question "Was there an explicit receiver?" to be meaningful, any more than the question "How many spaces are there after the method name when obj calls it?" to be meaningful. David -- "To fully realize the potential of Rails, it's crucial that you take the time to fully understand Ruby--and with "Ruby for Rails" David has provided just what you need to help you achieve that goal." -- DAVID HEINEMEIER HANSSON, in the foreword to RUBY FOR RAILS. Complete foreword & sample chapters at http://www.manning.com/black!