Brad Bowman wrote:
Assuming this is allowed, what will the .() calls below return?
Does the result depend on the calling context?
 one(any(@subs),sub { ... }).();

Starting to argument from the statement that junctions are values the above plays in the league of 3.() which might not have observeable side effects other then busying the compiler for a while. Actually it could be optimised away :)

I'd guess the rule is "call 'em all and return a similarly
structured junction".  How far off the mark am I?

Unless you ask a question nothing is called. So at least you need something like if one(...) {...}. Then the call order is undefined and might stop after the first success. Knowing about the constness of the return values of the subs referred to from the junction, and knowing that none of their values is false, these cases might be optimized towards the front when this stops the influx of further interrogation by the if. The reverse might apply for interrogation by unless---but that's up to the oracle :) -- TSa (Thomas Sandla▀)

Reply via email to