Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Are ordered hashes useful?



On Tue, Feb 8, 2011 at 9:49 PM, Josh Glover <jmglov@example.com> wrote:
>
> I've never needed it myself, in any language I've used, but I suppose
> it might be useful if you needed to guarantee the order of hash keys
> across multiple runs of your program. The order is likely to be the
> same anyway, but it seems wrong to rely on that.

Predictable hashing order can cause security problems (like
predictable anything, I suppose).  Perl used to have the same order of
hash keys across multiple runs, but they've now fixed that by picking
a random salt at startup.

-- 
Marty


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links