in reply to Re^2: Pronoun Programming
in thread Pronoun Programming
I think a hash element reference would have to be a pointer to an HE struct. That contains pointers to both the key and it's value. The thing that is missing is some way to get back to the hash it is a part of, as they form a single linked list going in the wrong direction.
There are several ways I would like to extend Perl's hashes, had I the skills and patience. This is one. Another would be to add timestamps to keys, that gets set when keys are created. That would allow for time ordered hashes which could be useful. And the same field could be used to order keys according to any arbitrary sorting order, which would be more space and time efficient than current tied hash+array hybrid solutions.
But, as almost every attempt I've made at messing with Perl's internals has resulted in random, inexplicable crashes which my attempts to resolve have fallen on deaf ears and stoney ground, it's not something I am likely to get around to any time soon.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Pronoun Programming
by plobsing (Friar) on Feb 05, 2008 at 14:32 UTC | |
by BrowserUk (Patriarch) on Feb 06, 2008 at 12:02 UTC | |
by plobsing (Friar) on Feb 07, 2008 at 01:56 UTC |