From: "David A. Black" Date: 2005-08-31T03:52:08+09:00 Subject: Re: Method behaves differently when called using #send Hi -- On Wed, 31 Aug 2005, Christian Neukirchen wrote: > "David A. Black" writes: > >>>> My problem with that is that the point of __send__ is to keep the name >>>> send available for user-defined methods (the same logic that has led >>>> to the freeing up of "id" through the creation of object_id). >>>> >>>> I think adding special significance to the __'s is too much of an >>>> afterthought, and also would reintroduce the same problem for people >>>> who want to write methods called "send". >>> >>> No, not really... if you want others to allow reusing "send", you can >>> still call __fcall__ (no private). >> >> I'm afraid I'm losing track. __fcall__ would be the same as send, and >> __send__ the same as fcall? I think I must be getting it wrong.... :-) >> >> I think that in every case throughout the language, if both abc and >> __abc__ exist, they should be synonymous. > > Ok, then we disagree. :-) > > I wanted #send to be the same as #__fcall__ and #__send__ not to > respect privateness (the __ is the dangerous sign for that method). We already have a danger sign for method names: ! And __ is already in use as a "name protection" sign. I don't think it's beneficial to change all of that around just for this one case. If the "danger" approach were used, I assume we'd get send!. But that's not how Matz views it (danger), so presumably we won't. >>> Assuming the #send (no private)/#send! (everything) approach was >>> accepted, this could get very confusing. >> >> I'm not sure why (one method does one thing; another does another; it >> seems very simple), but it's a moot point as Matz doesn't like it. > > It is interesting you want #abc and #__abc__ to do the same, but don't > care if #send sends a mail and #send! a message... I'm not sure what you mean. (Mail?) My suggestion was that send! would be the "dangerous" version of send. They'd both send messages to objects. Again, it's moot, but the whole thing was fully contained within what send does now -- just sharing it between two methods. My wanting abc and __abc__ to do the same comes from the fact that that's how they've always worked. I don't want __ to suddenly mean "name protection" in one place and "dangerous (like !)" somewhere else. David -- David A. Black dblack@wobblini.net