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 do
"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 F
HaloO,
On Thursday, 4. September 2008 03:39:20 Larry Wall wrote:
> 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 fo
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()
>>
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
defined/unde
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 do
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/f
> 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
off
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
>