HaloO,

[EMAIL PROTECTED] wrote:
The literals for Bit are just 0 and 1.

I doubt that this works. I assume that there are integer calculations
that give the result 1 as an Int. Then comparing these with === to the
literal 1 should fail because the types mismatch:

   my Int $x = 7 - 6; # $x.WHAT is Int

   $x === 1 ?? say "one" !! say "no Bit";

Well, or === behaves a bit more forgiving by canonicalizing types
before the comparison. But how does that work, then? I guess a
much saner approach is that no object will ever have a type Bit.
This type is useful only as constraint on containers and in dispatch.


Regards, TSa.
--

"The unavoidable price of reliability is simplicity" -- C.A.R. Hoare
"Simplicity does not precede complexity, but follows it." -- A.J. Perlis
1 + 2 + 3 + 4 + ... = -1/12  -- Srinivasa Ramanujan

Reply via email to