SRFI 225: Dictionaries Arthur A. Gleckler (19 Jul 2021 03:53 UTC)
Re: SRFI 225: Dictionaries Dr. Arne Babenhauserheide (19 Jul 2021 20:02 UTC)
Re: SRFI 225: Dictionaries John Cowan (20 Jul 2021 16:27 UTC)
Re: SRFI 225: Dictionaries Dr. Arne Babenhauserheide (21 Jul 2021 18:59 UTC)
delimited continuations; was: SRFI 225: Dictionaries Dr. Arne Babenhauserheide (19 Jul 2021 20:02 UTC)
Re: delimited continuations; was: SRFI 225: Dictionaries Marc Nieper-Wißkirchen (20 Jul 2021 15:26 UTC)
Re: delimited continuations; was: SRFI 225: Dictionaries Marc Nieper-Wißkirchen (21 Jul 2021 06:03 UTC)
Re: delimited continuations; was: SRFI 225: Dictionaries Ray Dillinger (21 Jul 2021 23:34 UTC)
Re: delimited continuations; was: SRFI 225: Dictionaries Marc Nieper-Wißkirchen (22 Jul 2021 07:23 UTC)
Re: delimited continuations; was: SRFI 225: Dictionaries Ray Dillinger (23 Jul 2021 07:14 UTC)
Re: delimited continuations; was: SRFI 225: Dictionaries Marc Nieper-Wißkirchen (23 Jul 2021 07:34 UTC)

Re: SRFI 225: Dictionaries Dr. Arne Babenhauserheide 19 Jul 2021 19:12 UTC
Hi,

Dictionaries look extremely useful — thank you!

One thing I miss in the specification are non-mutating update-procedures
that are better suited to functional style (without !-suffix).
Complemented by a way to ask whether they are efficient.

But the more I think about it, the more edge-cases I discover.

My initial idea was:

(dict-efficient-immutable-operations? dict)

Returns #t if the dictionary supports immutable update operations with
a cost lower than O(N) in space and time (with N the number of items in
the dictionary).

The problem here is that deletion is almost never efficient, but then
shere are addition-exclusion¹ sets in CRDTs (two grow-only sets, one of
which removes).
¹: not the official name.

A more restricted check might be useful, though: In functional style
(or more explicitly: in let-recursion) the two methods I see most often
used are set! and delete!: Aggregating results one-by-one and processing
data one-by-one.

So maybe the following two checks and the non-mutating operations could
be useful:

(dict-efficient-immutable-set? dict)
(dict-efficient-immutable-delete? dict)
(dict-set dict key1 value1 key2 value2 ...)
(dict-delete dict key1 key2 ...)

Best wishes,
Arne

Arthur A. Gleckler <xxxxxx@speechcode.com> writes:

> Scheme Request for Implementation 225,
> "Dictionaries,"
> by John Cowan (spec) and Arvydas Silanskas (implementation),
> is now available for discussion.
>
> Its draft and an archive of the ongoing discussion are available at
> https://srfi.schemers.org/srfi-225/.
>
> You can join the discussion of the draft by filling out the subscription
> form on that page.
>
> You can contribute a message to the discussion by sending it to
> xxxxxx@srfi.schemers.org.
>
> Here's the abstract:
>
> The procedures of this SRFI allow callers to manipulate an object that maps
> keys to values without the caller needing to know exactly what the type of
> the object is. Such an object is called a *dictionary* in this SRFI.
>
> Regards,
>
>
> SRFI Editor

--
Unpolitisch sein
heißt politisch sein
ohne es zu merken