On 2020-01-13 12:43, The Sidhekin wrote:


On Mon, Jan 13, 2020 at 8:51 PM ToddAndMargo via perl6-users <perl6-us...@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.

Absolutely!  uint belongs to UInt

 
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

Hi Erik,

"uint" belongs to "UInt".  The error message should tell me one
of the other.  I prefer "unit", but will compromise on "UInt".
The ONLY beef I have is with the error message.

What makes you think I did not understand the documentation?
Perhaps it is you who does not understand me? 

Oh this is interesting:
https://docs.perl6.org/type/UInt  (the raku one is missing the graphic)

"The UInt is defined as a subset of Int:" but does not show on
the graph.

UInt --> Any --> Mu , but no "Int"

Perhaps better stated would be
UInt --> Int --> Any --> Numeric --> Mu

I may have Mu and Numeric reversed



Documentation is a thankless task  and those that do
it are never appreciated.

-T







-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Reply via email to