Am Di., 20. Juli 2021 um 22:50 Uhr schrieb John Cowan <xxxxxx@ccil.org>:


On Tue, Jul 20, 2021 at 1:54 PM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:
 
(1) No user can later register plists because the empty list is already registered as an alist, meaning that SRFI 225 won't be able to support all well-known Scheme/Lisp dictionary types.

True.  But the use of plists in Scheme is still minimal, and in CL they are mainly used in order to handle function calls with keywords that have not been specified in advance (defining a function with &allow-other-keys turns off compile-time keyword checking).  Plists don't really have any advantages as general-purpose key-value stores over alists.

Maybe. But nevertheless, it pretty much shows the flaw of the current approach. Plists are just a well-known example. Alists with non-standard comparators


(2) Alists are still restricted to the `equal?' key comparator, which is too restrictive for general code.  One can try to remedy this by adding just another dynamically scoped parameter, say, `current-alist-equality-predicate' but this makes reasoning even harder and can cause a further slow-down. Moreover, it will become inconvenient as soon as code has to deal with two different types of alists in parallel.er by light years.

We really need a way to attach a comparator to an alist, but I don't see how, unless by consing it onto the alist.
Then it is no alist anymore, at least not an alist that is accepted and returned by a lot of existing procedures.

In any case, the problem is that the representation of an object of some data type, in general, does not contain enough information to reconstruct the data type. Given 0, do I mean the integer 0, the real zero, or the zero in a 13-dimensional Euclidean vector space?