On 2020-01-29 09:19, Trey Harris wrote:

The first line of https://docs.raku.org/type/UInt is:
 > The `|Int`| is defined as a subset of `|Int|:`

How does that not “reflect that UInt is not a unique [type, I assume you meant], but a subset of Int”?

You are correct.  Mumble, mumble.




    2) that uint is not a native type, but a subset of int.


But `uint` is not a subset of `int`; they’re both native types so can’t be subtypes as the constraints would have to hook to the metamodel, which uint and int lack because they’re unboxed. (A “sticker on the “box” is where you write the constraints, if you want to think of it that way.)

So long as it is treated as a subset of int, it is a subset.
I know, I am slicing the baloney thin here, but uint is
not a static C variable. It can change into an int with
the position of the moon.

If you have access to the C code, what is its definition?



    3) that uint and int are not "static" (in the C sense)
         variables and can be changed to other things with
         coercion and boxing.  A discussion on when and how
         that is done would be appreciated.


The indexing of Auto-boxing and linking to it where appropriate should solve this. Please open a doc issue stating exactly this (and not a request for 1 and 2, which are not valid).

Would you mind doing it?  My prose does not get past
the first level.

Reply via email to