On Mon, Feb 07, 2005 at 05:33:06PM +0100, Miroslav Silovic wrote:
> my $a = (0 | 6);
> say 4 < $a and $a < 2;

Yup.  My mathematic intuition cannot suffer that:

    4 < X < 2

to be true in any circumstances -- as it violates associativity.
If one wants to violate associativity, one should presumably *not*
use the chained comparison notation!

So Pugs will evaluate that to (#f|#f), by lifting all junctions
out of a multiway comparison, and treat the comparison itself as
a single variadic operator that is evaluated as a chain individually.

This way, both associativity and junctive dimensionality holds, so
I think it's the way to go.  Please correct me if you see serious
flaws with this approach.

Thanks,
/Autrijus/

Attachment: pgpbnBpjxcFNh.pgp
Description: PGP signature

Reply via email to