Rob Kinyon wrote:
> To me, this implies that junctions don't have a complete definition.
> Either they're ordered or they're not. Either I can put them in a <=
> expression and it makes sense or I can't. If it makes sense, then that
> implies that if $x <= $y is true, then $x > $y is false. Otherwise,
> the definitions of <= and > have been violated.

I'll beg to differ.  If you insist on that kind of restriction on
Junctions, they won't be able to serve their original (and primary)
purpose of aggragating comparison tests together.  Remember:

  if $x <= 1 & 5 {...}

is intended to be 'shorthand' for

  if $x <= 1 && $x <= 5 {...}

Therefore,

  $x = 3;
  if $x <= 1 & 5 {say 'smaller'}
  if $x > 1 & 5 {say 'larger'}

should produce exactly the same output as

  $x = 3;
  if $x <= 1 && $x <= 5 {say 'smaller'}
  if $x > 1 && $x > 5 {say 'larger'}

If it doesn't, then Junctions are useless and should be stricken from Perl 6.

And the definition of '>' is "greater than", not "not (less than or
equal to)".  The latter is a fact derived from how numbers and letters
behave, not anything inherent in the comparison operator.  Just like
'<=' is "less than or equal to", as opposed to "not greater than". 
You aren't violating the definitions of <= and > by failing to insist
that they be logical negations of each other; you're only violating
the common wisdom.

--
Jonathan "Dataweaver" Lang

Reply via email to