chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Alist versus Hash-table


From: Peter Bex
Subject: Re: [Chicken-users] Alist versus Hash-table
Date: Wed, 13 Nov 2013 09:02:37 +0100
User-agent: Mutt/1.4.2.3i

On Tue, Nov 12, 2013 at 06:41:18PM -0500, John Cowan wrote:
> Peter Bex scripsit:
> 
> > ((a . "foo") (a . "bar")) => ?a=foo;a=bar
> > 
> > A HTTP server might interpret this query string differently from ?a=foo
> 
> Ah, I see.  Yes, you're right; that's not really an a-list, as you wouldn't
> search it with assoc (or equivalent).

In practice, we generally do, in server-side Scheme programs.
However, you shouldn't make assumptions about the other end, so when
you're generating URIs you must be careful not to duplicate keys.
But if you want to see what value a particular key has and you don't
have a weird API which requires multiple occurrances of the same key,
you will generally also use alist-ref on the client.

Cheers,
Peter
-- 
http://www.more-magic.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]