Currently, this expression:
VALUE1 < VALUE2
is functionally equivalent to this:
$v2 = VALUE2;
$v1 = VALUE1;
return ($v2-$v1 == abs($v2-$v1));
After reading the Apocalypse & Exegesis articles, and seeing some examples
of properties and the "is" operator, I'd like to suggest that the
less-then operator be changed, so it is functionally equivalent to:
$v2 = VALUE2;
$v1 = (defined VALUE1.valueR ? VALUE1.valueR : VALUE1);
return ($v2-$v1 == abs($v2-$v1)) is valueR($v2);
which (assuming the operator's association was changed to "left") would
cause the following code to mean what beginning programmers always think it
should mean:
if ($foo < $bar < $baz) { ... }
It should be obvious how "> <= >= lt gt le ge" can similarly
be modified. Then even this would make sense...
if ($foo <= $bar > $yak lt $wak) { ... }
"== != eq ne" could be similarly modified (with the addition of a valueL
property to deal with precedence) but I haven't convinced myself it's a
good idea -- too many people like using == in place of xor...
if (($foo < $bar) == ($yak < wak)) { ... }
(I haven't even begun to consider <=> and cmp, but I'm sure there's
someone smarter then me out there with an idea on how/why they could
be modified as well (if for no other reason then to make obfuscated perl
contests even more interesting))
--
-------------------------------------------------------------------
"Oh, you're a tricky one." Chris M Hostetter
-- Trisha Weir [EMAIL PROTECTED]