References and copy-on-write

2002-07-24 Thread Aaron Sherman
I had assumed Perl6 will have copy-on-write references, so that $x = [1,2,3]; @y = *$x; would not require a copy. However, on thinking about it further, I realized that that would get you in trouble here: $x = [1,2,3]; %h{$x} = 1; @y = *x; $x[0]++; print %h{$x}; Thi

RE: RFC - Hashing PMC's

2002-07-24 Thread Aaron Sherman
On Wed, 2002-07-24 at 12:34, Fisher Mark wrote: > > But then sometimes you'd *want* hashing to be based on the > > content. > > OK, I'll bite -- when would you want this behavior? This behavior means > that once you change the contents, the hash value would become irretrievable > unless you rest

RE: RFC - Hashing PMC's

2002-07-24 Thread Fisher Mark
> But then sometimes you'd *want* hashing to be based on the > content. OK, I'll bite -- when would you want this behavior? This behavior means that once you change the contents, the hash value would become irretrievable unless you restored the contents of the key. (Is this useful in functional

RE: RFC - Hashing PMC's

2002-07-24 Thread Fisher Mark
As the last person to change the key hash algorithm, I'd like to chime in here with a request that each PMC provide a string that the key hashing algorithm can operate on. To some degree this is just selfish on my part -- I've got plans for upgrading the key hash algorithm in Perl 5 and Perl 6 wh