Re: What happened to err operator?

2008-09-07 Thread Dr.Ruud
TSa (Thomas Sandlaß) schreef: Larry Wall: Another potential issue is that CATCH doesn't distinguish exceptions coming from the current block from those coming from the subcall to a(). So it could end up returning Failure from the current block when you intended to force return of Failure

Re: What happened to err operator?

2008-09-07 Thread John M. Dlugosz
TSa (Thomas Sandlaß) thomas-at-sandlass.de |Perl 6| wrote: a() proceed: orelse b(); CATCH { ... # make $! into return value goto proceed; } This kind of needs to know the variable the return value of a() is stored into. This is easy if orelse is checking $! anyway. But

Re: What happened to err operator?

2008-09-03 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: a() orelse b() you might want to: succeed on a() trap mild failure of a() and try to succeed on b() instead fail completely on drastic failure of a() At the moment this three-way distinction depends on whether a() returns

Re: What happened to err operator?

2008-09-03 Thread Larry Wall
On Wed, Sep 03, 2008 at 06:41:10PM -0500, John M. Dlugosz wrote: Larry Wall larry-at-wall.org |Perl 6| wrote: a() orelse b() you might want to: succeed on a() trap mild failure of a() and try to succeed on b() instead fail completely on drastic failure of a() At the moment

Re: What happened to err operator?

2008-09-02 Thread ajr
On Sun, Aug 31, 2008 at 04:28:36PM -0500, John M. Dlugosz wrote: Has the err operator, as a low-precidence version of //, been removed? Yes. It could be recycled as a fuzzy Boolean, returning a fractional value between +1 and -1, indicating the confidence with which the result is offerred.

Re: What happened to err operator?

2008-09-02 Thread Mark J. Reed
I think you're thinking of the erm operator... But back to orelse - is the only difference between and/or and andthen/orelse the fact that the result of the lhs gets passed as a parameter into the rhs? 'Cause I don't see the difference between short circuit and proceed on success/failure. On

Re: What happened to err operator?

2008-09-02 Thread Larry Wall
On Tue, Sep 02, 2008 at 07:56:33PM -0400, Mark J. Reed wrote: : I think you're thinking of the erm operator... : : But back to orelse - is the only difference between and/or and : andthen/orelse the fact that the result of the lhs gets passed as : a parameter into the rhs? 'Cause I don't see the

Re: What happened to err operator?

2008-09-01 Thread Larry Wall
On Sun, Aug 31, 2008 at 04:28:36PM -0500, John M. Dlugosz wrote: Has the err operator, as a low-precidence version of //, been removed? Yes. It's not mentioned in S03, and the semantics of orelse is different. Is orelse supposed to be a direct replacement, meaning if you ignore the

What happened to err operator?

2008-08-31 Thread John M. Dlugosz
Has the err operator, as a low-precidence version of //, been removed? It's not mentioned in S03, and the semantics of orelse is different. Is orelse supposed to be a direct replacement, meaning if you ignore the parameter thing then it doesn't change anything?