Front page | perl.perl6.language |
Postings from August 2001
RE: two-way hashes
From:
Mitchell, Adam R
Date:
August 5, 2001 03:15
Subject:
RE: two-way hashes
Message ID:
1B1080D3ADDF8D4AB59832DE0A02C52A023EFA@pnlmse06.pnl.gov
sounds like a good idea, but we can't limit multiple values, so it might be
better if it returns an array. maybe the code should look more like this:
@{value}hash = key
or maybe
@%{value}hash = key
unless this clashes with something else
-----Original Message-----
From: raptor [mailto:raptor@unacs.bg]
Sent: Thursday, August 02, 2001 7:41 AM
To: perl6-language@perl.org
Subject: two-way hashes
hi,
I tought about a posibility to access a HASH in way that the VALUES can also
be used like KEYS...i.e in perl6 I will say this :
%hash{key} = value;
I want to say also :
{value}hash% = key;
print {value}hash%;#will print the key for this value...
joking :")) but is this good... or I'm talking bullsh...s again ..
Ofcource this mean that we can't have the same value in the HASH.
=====
iVAN
raptor@unacs.bg
=====
-
RE: two-way hashes
by Mitchell, Adam R