Larry Wall <[EMAIL PROTECTED]> writes: > On Thu, Oct 16, 2008 at 10:37:41PM +0200, Eirik Berg Hanssen wrote: > : [EMAIL PROTECTED] writes: > : > : > -C<< infix:<where> >>, sequential junctional and operator > : > +C<< infix:<also> >>, sequential junctional and operator > : > > : > - EXPR where EXPR where EXPR ... > : > + EXPR also EXPR also EXPR ... > : > > : > Can be used to construct ANDed patterns with the same semantics as > : > C<< infix:<&> >>, but with left-to-right evaluation guaranteed, for use > : > in guarded patterns: > : > > : > - $target ~~ MyType where .mytest1 where .mytest2 > : > + $target ~~ MyType also .mytest1 also .mytest2 > : > > : > This is useful when later tests might throw exceptions if earlier > : > tests don't pass. This cannot be guaranteed by: > : > : All this, just to get the exceptions in the right order? > > It's to get exceptions not to happen at all. Normal junctions don't > trap exceptions either, but also can't guarantee order of evaluation. > This variant does. That's all.
Okay, I may be particularly slow this week, but shouldn't that be specced as "short-curcuit" rather than merely "sequential" and "with left-to-right evaluation guaranteed"? (I don't see how you can get exceptions not to happen at all, unless it's short-circuiting.) Eirik -- "Minimal collateral damage" and "entire star system" do *not* belong in the same sentence. -- Howard Tayler, http://www.schlockmercenary.com/d/20050326.html