I think of %% as being Perl 6's is-divisible-by operator, so I was a little
surprised to discover this behavior:

> 1 %% 0
Attempt to divide 1 by zero using infix:<%%>
  in block <unit> at <unknown file> line 1

The docs say a %% b is True if a % b is 0, so the error is as-designed, at
least.  But mightn't it make more sense for %% to just return False when
given a second zero operand?  After all, the answer to "is n divisible by
zero" is false for any n--there's no need to try to go through with the
division to ascertain this.

Reply via email to