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: Tue, 15 Feb 2011 22:58:19 +0900
- From: "Stephen J. Turnbull" <stephen@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> <AANLkTiknPv3VsKzKQVxMacFE9i9aSSmwXDU4Fz+rZU3g@example.com> <4D584678.6050501@example.com> <87d3mvs3ni.fsf@example.com> <4D5A53DB.6050402@example.com>
Simon Cozens writes: > On 14/02/2011 03:20, Stephen J. Turnbull wrote: > > But most of the examples you give there (eg, histogram) are really > > special cases of dictionary. > > No, I don't think so, and this is the point. Dictionaries define a > transformation between list A and list B. What we often think of > as mapping between two lists is more often asking questions about > the structure of one list. Do you mean a "list of structures"? The example I have in mind is Emacs (why aren't you surprised?) where often we want to ask questions about the character at some position in a buffer. For example, is it a parenthesis-like character that should have a match somewhere else? Is it a space character allowing a line break when filling text? Rather than turn buffer characters into structures, of course Emacs handles this by representing characters as themselves, and many properties as dictionaries mapping characters to appropriate values. But I don't see why that invalidates the example of "histogram is dictionary", especially not that example. A histogram does *not* tell you the structure of a list (except itself, ie, the list of ordered pairs). Rather, a very common use of histograms is to compare different distributions on the *same* domain -- clearly any given histogram is not a property of the domain in that case. So as far as I can see the only thing special about histograms is that they happen to take non-negative numerical values for all keys.
- 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: Jun-Dai Bates-Kobashigawa
- Re: [tlug] Are ordered hashes useful?
- From: Simon Cozens
- Re: [tlug] Are ordered hashes useful?
- From: Stephen J. Turnbull
- Re: [tlug] Are ordered hashes useful?
- From: Simon Cozens
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Are ordered hashes useful?
- Next by Date: Re: [tlug] Ubuntu server, Windows 7 client, and the firewall between them [SOLVED]
- 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