On Tue, 30 Sep 2008, Patrick R. Michaud wrote:
> Just for pedantic clarity, what C< $directive ne 'VAR' & 'LOOP' & 'IF' >
> really gives is
>
>     all( $directive ne 'VAR', $directive ne 'LOOP', $directive ne 'IF' )
>
> In other words, the result of the expression is an all() Junction. In
> boolean context this would indeed evaluate to false if $directive has any
> of the values 'VAR', 'LOOP', or 'IF'.

Does it have to be this way?

In formal logic, distributing a negation over a disjunction products a
conjunction and vice versa.

Perl has a long tradition of dwimmery, so why are we taking a literal
"distribute all symbols the same way" approach?

Surely it is more important that ($a ne $b) should be equivalent to not( $a
eq $b ) regardless of whether either variable contains a junction?

As a start, perhaps we should be marking certain operators (not ! none() !=
ne) with whether they represent a logical inversion, so that conjunctions
and disjunctions can be alternated?

-Martin Kealey

Reply via email to