develooper Front page | perl.perl5.porters | Postings from December 2011

Re: perl's hash randomization in the news

Thread Previous | Thread Next
Zsbán Ambrus
December 31, 2011 06:32
Re: perl's hash randomization in the news
Message ID:
On Fri, Dec 30, 2011 at 10:39 PM, Reini Urban <> wrote:
> What I remember was that the random order of keys with the new perl
> hashes caused other languages to feel superior:
> "Our hash key order is predictable and always the same"

No, I think that was after ruby has rigged their hashes to remember
the order of insertion of their elements and always iterate them in
that order.  (Thus if you put a hash constructor in your code, then
print that hash, the pairs are printed in the order they are in your
code.)  Python has later introduced the same in a module
(collections.OrderedDict), but not for the default dict class.


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