develooper Front page | perl.perl6.language | Postings from May 2005

junctions vs English negatives.

Thread Next
From:
Larry Wall
Date:
May 14, 2005 09:31
Subject:
junctions vs English negatives.
Message ID:
20050514163129.GB13191@wall.org
We have a bit of a problem with negative operators applied to junctions,
as illustrated recently on PerlMonks.  To wit, when a native English 
speaker writes

    if $a != 1 | 2 | 3 {...}

they really mean one of:

    if not $a == 1 | 2 | 3 {...}
    if $a == none(1, 2, 3) {...}

or, expressed in current understanding of negated ops:

    if $a != 1 & 2 & 3 {...}
    if $a != all(1, 2, 3) {...}

They specifically do *not* mean

    if $a != any(1,2,3) {...}

since that would always be true.

I don't think we can allow this situation to stand.  Either we have
to make != and !~ and ne transform themselves via "not raising", or
we have to disallow negative comparisons on junctions entirely.

Opinions?

Larry

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About