Re: References to hash elements?

[email protected] ("Paul Johnson")
Newsgroups perl.perl6.internals,perl.ponie.dev
Message-ID <[email protected]>
Leopold Toetsch said:
> Dan Sugalski <[email protected]> wrote:
>
>> This is entirely a matter of opinion and data design ...
>
> Yep, that's it. The current behavior additionally is inconsistent.
> Retrieving a reference (that is Parrot) out of a non-existant hash key
> gives and unrelated new PerlUndef, when assigning to that, nothing
> happens.
>
> When you get a ref by an existing key, you can happily change data
> inside the hash.
>
> I've refered to the subject of the former thread, there are examples.
>
> So what will/should Parrot provide, to solve that?
>
> IMHO we are additionally lacking vtable methods to achieve the HLL value
> assign behavior: We only have references inside our aggregates. That
> doesn't matter per se, you can always clone the PMCs before storing, or
> you store only newly created PMCs, that's ok, but in the case of
> retrieving a reference or a value from an hash with an unexisting key,
> it would matter, the one does autovifiy the latter doesn't.

I wonder whether this message from Larry might be useful?

  http://www.mail-archive.com/[email protected]/msg14525.html

-- 
Paul Johnson - [email protected]
http://www.pjcj.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.