develooper Front page | perl.perl5.porters | Postings from September 2002

Re: Collections

Thread Previous | Thread Next
From:
Arthur Bergman
Date:
September 29, 2002 09:56
Subject:
Re: Collections
Message ID:
4A766D3B-D3CC-11D6-82FB-003065D64CBE@contiller.se

On söndag, sep 29, 2002, at 12:55 Europe/Stockholm, Elizabeth Mattijsen 
wrote:

> At 03:03 AM 9/29/02 -0400, Michael G Schwern wrote:
>> On Sun, Sep 29, 2002 at 06:44:28AM +0200, Christian Jaeger wrote:
>> > Maybe the coolest thing would be when perl hashes would just accept
>> > refs as keys without stringification, i.e. keys %hash would then
>> > return refs in such cases. Maybe it would be possible to tie a hash
>> > and implement it through XS to get that thing?
>> Might it be time to do away with this and finally elevate hash keys 
>> to full
>> SVs?
>
> Hmmm... and yet another few % of performance go down the drain...
>
> I understand parrot / perl 6 will allow true objects as keys in 
> hashes.  Maybe we should wait for that?  If you are not that worried 
> about performance in the mean time, what Christian wants should be 
> trivial to implement using tie() (if it doesn't exist already).
>
>
> Liz
>
>

As far as the C source shows, you should be able to put a SV as a hash 
key, there are flags and everything for it.

Arthur


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About