another round of call-chaining mystery?

kris foo at bar.com
Thu Mar 29 22:38:40 PDT 2007


James Dennett wrote:
> kris wrote:
[snip]
>>There never was any argument of which you claim. I simply noted that
>>eval-order had been clarified before, using your usage of "eval-order"
>>from within the same post. If you revisit, you'll see that was actually
>> referring to call-chaining instead, so there's perhaps a misuse of terms:
>>
>>   Cout.opCall("Hello, ").opCall(Cin.get);
>>
>>As you can see, there is only one parameter passed to each call, and
>>therefore the order of /parameter/ eval is "not at stake here" (as I
>>noted to Frits). 
> 
> 
> There are two arguments to the second opCall.  One is
> the result of Cout.opCall("Hello, ") and the other is
> the result of Cin.get, and they can be evaluated in
> either order unless some rule prohibits it.

I think you'll find that call-chaining does not operate in that manner, 
James? If you look a bit closer, you'll see that the lhs has to be 
evaluated first, simply to get something to deref the rhs. Further, 
there is only one argument permitted to the opCall() itself

For a fuller description, I suggest you bring it up with Walter instead?

> Please, just address the technical content rather than
> flaming.

With pleasure, James Dennett



More information about the Digitalmars-d mailing list