> On 12 Feb 2020, at 13:44, Aureliano Guedes <guedes.aureli...@gmail.com> wrote:
> 
> What "WHERE" should return?
> 
> I was trying to find a method to return the memory address of some data.
> Then I find the WHERE statement.
> https://rosettacode.org/wiki/Address_of_a_variable#Perl_6
> https://docs.perl6.org/language/mop#WHERE

Please note that the memory address is *NOT* fixed for the lifetime of an 
object.  Garbage collection may move it to another memory location at *any* 
time.  I've therefore adapted the documentation of .WHERE to:

Returns an C<Int> representing the memory address of the object.  Please note
that in the Rakudo implementation of Raku, and possibly other implementations,
the memory location of an object is B<NOT> fixed for the lifetime of the
object.  So it has limited use for applications, and is intended as a debugging
tool only.

https://github.com/Raku/doc/commit/3e6270d197

Reply via email to