[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: plists, alists, and hashtables
From: |
Rusi |
Subject: |
Re: plists, alists, and hashtables |
Date: |
Wed, 5 Aug 2015 05:20:10 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Wednesday, August 5, 2015 at 3:17:44 PM UTC+5:30, Ted Zlatanov wrote:
> On Wed, 05 Aug 2015 08:12:22 +0200 "Pascal J. Bourguignon" wrote:
>
> PJB> What you are losing from sight is the fact that:
>
> PJB> - a-lists are lists
> PJB> - p-lists are lists
> PJB> - lists are sequences
And lists (if you were to think mathematically) are sequences
And sequences are maps; in more detail:
A finite sequence over τ 𝒮(τ) is a function {1..n} → τ
An infinite sequence over τ 𝒮(τ) is a function ℕ → τ
On the other side, a hash-table is just a map from keys to values
(with algorithmic/storage-layout mixed up as is usually done by low-level
programmers)
In short a map is the fundamental data structure.
Alternate Existence Proof: Lua has only one data structure -- the table -- which
does the job of both lists and hashes
- plists, alists, and hashtables (was: How to iterate over properties in a plist?), Ted Zlatanov, 2015/08/04
- Re: plists, alists, and hashtables (was: How to iterate over properties in a plist?), Rusi, 2015/08/05
- Re: plists, alists, and hashtables, Pascal J. Bourguignon, 2015/08/05
- Re: plists, alists, and hashtables, Ted Zlatanov, 2015/08/05
- Re: plists, alists, and hashtables,
Rusi <=
- Re: plists, alists, and hashtables, Stefan Monnier, 2015/08/06
- Message not available
- Re: plists, alists, and hashtables, Rusi, 2015/08/07
- Re: plists, alists, and hashtables, Pascal J. Bourguignon, 2015/08/05
- Re: plists, alists, and hashtables, Ted Zlatanov, 2015/08/05
- Re: plists, alists, and hashtables, Barry Margolin, 2015/08/05
- Re: plists, alists, and hashtables, Robert Thorpe, 2015/08/05
- Re: plists, alists, and hashtables, Pascal J. Bourguignon, 2015/08/05
- Re: plists, alists, and hashtables, Ted Zlatanov, 2015/08/06
- Re: plists, alists, and hashtables, Pascal J. Bourguignon, 2015/08/06
- RE: plists, alists, and hashtables, Drew Adams, 2015/08/06