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

Re: stolen uint's

Thread Previous | Thread Next
ToddAndMargo via perl6-users
January 30, 2020 19:56
Re: stolen uint's
Message ID:
On 2020-01-30 08:11, Andy Bach wrote:
>>> I’m STILL waiting  for you to show me ONE example of a `uint` turning
>>> into `int`.  Not `Int`, via auto-boxing, `int`, via who-knows-what.
> $ p6 'my uint8 $u; say $u.^name;'
> Int
> Did you not notice the capital "I" in both his request and your code output?

Hi Andy,

Oh I did.  It was just a bad example.

And as far as the Int thing goes, to figure that out,
the structure of the variable had to be queried,
so there is a trail back to the actual type of
of variable.  In other words, it should have
given the correct answer as to what the variable
was declared as.  So no excuses.

Raku variables all come with structures, so
no excuses for ^name saying a banana is a rabbit.
The structure is were ^name queried to get
the Int.

My opinion, ^name should be dropped if it is
not going to give back the actually type of the

I posted a better example showing where a
declared uint8 was being treated as a int8:
suddenly, 0xFF became -1.


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