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

Re: Mutating keys

This page is part of the web mail archives of SRFI 69 from before July 7th, 2015. The new archives for SRFI 69 contain all messages, not just those from before July 7th, 2015.

On 8/18/05, Panu Kalliokoski <atehwa@xxxxxxxx> wrote:
> This is a complicated issue.  My implementation currently adds the value
> from the _last_ association in the list, which is probably what you mean
> ty "added in the order they appear".  But because assoc&friends returns
> the first occurrence, picking the first value would make the API more
> consistent with alists.

This is a good point.  It's not uncommon to use acons without first checking
for the existence of the item in the list for efficiency and/or for
transparent updates of shared alists.  I think it might make sense to explicitly
require alist->hash-table to always reflect the first value in the alist.