From: "David A. Black" Date: 2005-04-16T03:02:41+09:00 Subject: Re: return_value? [Was: Re: want_object? - possible?] On Sat, 16 Apr 2005, Mark Hubbart wrote: > On 4/15/05, Eric Hodel wrote: >> On 14 Apr 2005, at 22:20, Mark Hubbart wrote: >>> >>> The example above, while being very funny, is nothing like what's >>> being suggested: >>> - it's a custom method grabbing absurdly specific external context >>> information >>> - it's using the requested information to do something entirely silly >>> in it own right >>> By using this example, it appears that you are trying to say that it's >>> a slippery slope; from a method telling you whether a return value is >>> in a position to be used, to a specialized method call which tells you >>> whether a specific method of a certain class will be called on the >>> result. >> >> I think the (snipped) example was highly illustrative. > > Maybe I'm wrong. The code seemed intended to be ridiculous, a parody > of "what might happen". I mean really, "subsequently_flattened?"? But > I suppose I might have misjudged. It's more an example of what would have happened, already, with a #return_value_used? method -- namely, there would be leakage of knowledge about the next method call into this method call, which I think is bad. Having a facility that tells you whether you are being succeeded by a call to #flatten is just a minor variant of having a facility that tells you whether you are being succeeded by another method call at all. I used that example, not to warn of unreasonable uses that might lie beyond a reasonable use, but to bring into sharper relief the problems that inhere in the whole thing in any form. David -- David A. Black dblack@wobblini.net