develooper Front page | perl.perl6.internals | Postings from August 2002

[IDEA] multidim hashes

Thread Next
Josef Hook
August 22, 2002 05:35
[IDEA] multidim hashes
Message ID:

I've just got a cvaazy idea. Why not have a multihash.pmc, multdimensional
hashes. I've been going through perlhash code and my multiarray code and,
as i see it, its doable. Why would we want something like that one
could ask? One idea is for translation from different languages ex:

   new P0, .PerlString
   set P0, "dra ut ansiktet för att se svensk ut"
   new P1, .MultHash
   set P1[elongate][the][face][to be][swedish], P0

Maybe its not the best example i just made it up.
What needs to be done is copy calc_multi_offset function from multiarray
and also add an INTVAL to bucket struct that we use for finding correct
bucket when the hash grows. its all in my head. So what do you all think
about it? is it cvaaazy or goood.. :-)


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About