develooper Front page | perl.perl6.users | Postings from January 2020

Re: stolen uint's

Thread Previous | Thread Next
ToddAndMargo via perl6-users
January 29, 2020 16:58
Re: stolen uint's
Message ID:
On 2020-01-28 22:16, Veesh Goldman wrote:
> Hi Todd,
> I'd just like to point out one thing. Your confusion here (and in a few 
> related posts) is that you aren't grokking the difference between uint 
> and UInt.

Hi Veesh,

I am well aware of the difference between UInt and uint.  Two
weeks ago I was not.

And because they are different, when I ^name on a variable,
I don't want to see some different come back than what I
declared it as.

Now Perl variables are not "Static" variables as in C.  They
have structures assigned to them that allow for all kinds on
interesting things not allowed in C.  Inside these structures
is the definition of what the thing is, otherwise you
could not unbox them, etc..  I want both ^name and .range
to accurately reflect what is in the structure's definition.

And especially since this is even possible with C, It should
be possible with Raku being that Raku is written in C.

typeMappings[type_index( typeid(unsigned int) )] = "unsigned int";

And C has no structures to inquire from.

Basically, if I ask a banana what it is, I don't want
to be told it is an apple.

> Please correct me if I'm wrong. But if there needs to be an update to 
> docs, it probably should be to a document that clarifies the difference.

I would like to see the docs updates to

1) reflect that UInt is not a unique variable, but a subset
    of Int

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

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.


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

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About