On 2020-01-13 22:56, Darren Duncan wrote:
Brad is saying what I've been saying, while a uint CAN represent a cardinal number, one does NOT ALWAYS represent a cardinal number, so saying this only IS a cardinal number is WRONG. -- Darren Duncan

Hi Darren,

You are mixing specific data constructions with generic
arithmetic and programming terms.

The Raku uint series of natives and UInt in Raku
are all cardinals.  Raku and assembly code like
to call them "unsigned integers".  Other languages
freely use the term Cardinal.  Both names are the
same thing.  The difference is that one is quicker
to spell, that is all.  Pick which either name
your like.

Since Raku uses the term "unsigned integers" for the
family of numbers that cardinals belong to, it is
probably best to call them "unsigned integers" so as
to not cause the confusing/consternation I caused.

$ p6 'my UInt $c = -4;'
Type check failed in assignment to $c; expected UInt but
got Int (-4) in block <unit> at -e line 1

You can get away with a standard uint as Raku will
flip the type on you on the fly.  It won't flip
a UInt as it is a subset.

Now if you want to talk specific data constructions:
an int8 is not an int16, even though both are
"generic term" integers.  And an uint16 is not a
uint32 even though the are all "generic
term" cardinals / unsigned integers, whichever
name you picked.

When you hear me say "cardinal", think he is talking
about a family of numbers, not a specific data
construction.

Oh and Raku has an unbounded by byte length cardinal
called a UInt.  Any byte length goes and way, way
past 64 bits if you want.  Now that is a machine
language abomination and I LOVE IT!  Damn Larry
is cleaver!

-T

Reply via email to