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
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
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
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
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.
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
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
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
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?