On Mon, Jan 13, 2020 at 8:51 PM ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> On 2020-01-13 11:10, ToddAndMargo via perl6-users wrote:
> >
> > https://docs.raku.org/type/UInt
> >     Subset UInt
> >     Unsigned integer (arbitrary-precision)
> >     The UInt is defined as a subset of Int:
> >     my subset UInt of Int where {not .defined or $_ >= 0};
> >     Consequently, it cannot be instantiated or subclassed;
> >     however, that shouldn't affect most normal uses
>
> Trivia:
>
> In https://docs.raku.org/type/UInt, a cardinal (uint)
> is a subset
>

  Nope.  Case matters.  It's mixed case "UInt" (not "uint") that's a subset.


> In https://docs.raku.org/language/nativetypes, a
> cardinal (unit) gets their own "native type".
>

  … whereas (lower case) "uint" is a native type.

  Documentation is easier to understand if you read what it says, and not
what you expect it to say.


Eirik

Reply via email to