Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Are ordered hashes useful?
- Date: Fri, 11 Feb 2011 15:03:09 +0100
- From: Josh Glover <jmglov@example.com>
- Subject: Re: [tlug] Are ordered hashes useful?
- References: <4D4E75AB.5060703@example.com> <4D4FB368.4010403@example.com> <AANLkTimk8AUJMRiwbPjGfDfciCwfaQr9_o3vBXtW2+rW@example.com> <87lj1rza76.fsf@example.com> <AANLkTikqy8G6G1Pt3ramSqxKHKJHSpo=zjHYLVENW0Gb@example.com> <878vxqyfok.fsf@example.com> <AANLkTinyP3HG_7H+qf5BeDikJ_kMSLvxU=EcRYyMubZ0@example.com> <8762suy66k.fsf@example.com> <AANLkTin3X1uhvUNooaMk5OD6y36H23U6dceFBmK7885M@example.com> <AANLkTi=bAnQoetsFvLJJvKE3q+zZQ3gPu4CDrGppdVmN@example.com>
On 11 February 2011 13:09, Kenneth Burling <burlingk@example.com> wrote: > My understanding of Hashes was that Hash keys are quite often a way of > getting away from the need for predictable ordering. That's one reason. Some others are: * O(1)--i.e. constant time--access * meaningful indexes; you often do stuff like this: my_hash.each.map {|key, val| key =~ /foo/ ? something(val) : something_else(bar) } * human-readable params in languages that do not natively support named params (Python does, Ruby 1.8--and 1.9 as well, IIRC--and Perl do not) I'm sure I'm missing some other good uses for hashes. :) -- Cheers, Josh
- Follow-Ups:
- Re: [tlug] Are ordered hashes useful?
- From: Raymond Wan
- References:
- [tlug] [Javascript] Shouldn't there be a sort option on objects
- From: Dave M G
- Re: [tlug] [Javascript] Shouldn't there be a sort option on objects
- From: Raymond Wan
- Re: [tlug] [Javascript] Shouldn't there be a sort option on objects
- From: Josh Glover
- Re: [tlug] [Javascript] Shouldn't there be a sort option on objects
- From: Stephen J. Turnbull
- Re: [tlug] [Javascript] Shouldn't there be a sort option on objects
- From: Josh Glover
- [tlug] Are ordered hashes useful?
- From: Stephen J. Turnbull
- Re: [tlug] Are ordered hashes useful?
- From: Josh Glover
- Re: [tlug] Are ordered hashes useful?
- From: Stephen J. Turnbull
- Re: [tlug] Are ordered hashes useful?
- From: Josh Glover
- Re: [tlug] Are ordered hashes useful?
- From: Kenneth Burling
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Are ordered hashes useful?
- Next by Date: Re: [tlug] Are ordered hashes useful?
- Previous by thread: Re: [tlug] Are ordered hashes useful?
- Next by thread: Re: [tlug] Are ordered hashes useful?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links