At 11:36 23/01/2001 +0100, John Hughes wrote:
>> Neither does delete.
>
>Ok.  But what should it do?  What does it do for an array?

perldoc -f delete

"In the case of an array, if the array elements happen to be at the end,
the size of the array will shrink to the highest element that tests true
for exists() (or 0 if no such element exists)."

Pretty much what one would expect.

>> All they do is hide a multitude of sins, for very little real world
>> gain. Try it - convert your app back to non-pseudo hashes and see what
>> performance you lose. I'm willing to bet its not a lot.
>
>Well, obviously.  Hashes aren't slow.  But they are *BIG*.

That's why arrays are so cool. And there are many tricks to make them work
pretty much the way you'd expect a hash to work, with very few limitations.
I also have a mind to try and play with use overload '%{}' on an array
based object to see if interesting stuff could be done there. It'll be
slower of course, but it could perhaps beat a tied hash (ties asre awfully
slow).

-- robin b.
We are born naked, wet and hungry . Then things get worse. 

Reply via email to