On Tue, Aug 31, 2021 at 5:25 AM Marc Nieper-Wißkirchen <
xxxxxx@gmail.com> wrote:
Does it make sense to have the same generic interfaces for both kinds of dictionary types?
I mean, is there a pressing need for a common interface?
I think there is. An idea that came to me the other day was supporting authentication/authorization, where the authentication token is a key and the properties of the principal identified by it, including authorized resources, are the value. A POC could use an alist, but in practice you probably want a key-value store or SQL table. Allowing the latter two to be instances of the dictionary typeclass makes this change easy.
If there is, we should define a loose hierarchy of dictionary type descriptors that classifies which are capable of what. Similar to the C++ iterator categories.
Can you elucidate? Thanks.
All current dictionary types allow an object to be copied and a new object returned. But in a type in which all dictionaries have external names (e.g. a key-value disk store like BDB or a database table), simple copying won't work.
A consequence of this is that types that are naturally mutational (like both the above types) cannot be provided with functional equivalents.
I don't know what to do about this.