iset-search implementations Wolfgang Corcoran-Mathe (08 Dec 2020 20:01 UTC)
Re: iset-search implementations Marc Nieper-Wißkirchen (08 Dec 2020 20:18 UTC)
Re: iset-search implementations Wolfgang Corcoran-Mathe (09 Dec 2020 18:07 UTC)
Re: iset-search implementations Marc Nieper-Wißkirchen (10 Dec 2020 12:00 UTC)
Re: iset-search implementations Arthur A. Gleckler (10 Dec 2020 16:40 UTC)
Re: iset-search implementations Marc Nieper-Wißkirchen (10 Dec 2020 16:50 UTC)
Re: iset-search implementations Arthur A. Gleckler (10 Dec 2020 16:52 UTC)
Re: iset-search implementations John Cowan (11 Dec 2020 02:24 UTC)
Re: iset-search implementations Wolfgang Corcoran-Mathe (11 Dec 2020 02:47 UTC)
Re: iset-search implementations John Cowan (11 Dec 2020 03:05 UTC)
Re: iset-search implementations Wolfgang Corcoran-Mathe (11 Dec 2020 18:41 UTC)
Re: iset-search implementations Marc Nieper-Wißkirchen (12 Dec 2020 10:59 UTC)
Re: iset-search implementations Wolfgang Corcoran-Mathe (14 Dec 2020 17:44 UTC)
Re: iset-search implementations John Cowan (16 Dec 2020 15:34 UTC)
Re: iset-search implementations Marc Nieper-Wißkirchen (16 Dec 2020 15:42 UTC)
Re: iset-search implementations Wolfgang Corcoran-Mathe (31 Dec 2020 18:23 UTC)
Re: iset-search implementations John Cowan (07 Jan 2021 21:42 UTC)
Re: iset-search implementations Arthur A. Gleckler (08 Jan 2021 04:40 UTC)
Re: iset-search implementations Marc Nieper-Wißkirchen (08 Jan 2021 13:32 UTC)
Re: iset-search implementations Wolfgang Corcoran-Mathe (08 Jan 2021 23:47 UTC)
Re: iset-search implementations Marc Nieper-Wißkirchen (09 Jan 2021 13:28 UTC)
Re: iset-search implementations Wolfgang Corcoran-Mathe (10 Jan 2021 23:35 UTC)
Re: iset-search implementations Arthur A. Gleckler (11 Jan 2021 00:05 UTC)
Re: iset-search implementations Marc Nieper-Wißkirchen (11 Jan 2021 06:33 UTC)
Re: iset-search implementations Wolfgang Corcoran-Mathe (11 Jan 2021 00:28 UTC)
Re: iset-search implementations Marc Nieper-Wißkirchen (12 Jan 2021 14:34 UTC)
Re: iset-search implementations Wolfgang Corcoran-Mathe (12 Jan 2021 18:55 UTC)
Re: iset-search implementations Marc Nieper-Wißkirchen (18 Jan 2021 09:13 UTC)
Re: iset-search implementations Wolfgang Corcoran-Mathe (19 Jan 2021 18:54 UTC)
Re: iset-search implementations Marc Nieper-Wißkirchen (20 Jan 2021 10:53 UTC)
Re: iset-search implementations Wolfgang Corcoran-Mathe (21 Jan 2021 20:31 UTC)
Re: iset-search implementations Marc Nieper-Wißkirchen (11 Dec 2020 08:40 UTC)

Re: iset-search implementations Wolfgang Corcoran-Mathe 09 Dec 2020 18:07 UTC

On 2020-12-08 21:18 +0100, Marc Nieper-Wißkirchen wrote:
> I haven't thought about it thoroughly yet (of course), but I'd say that a
> restriction for SRFI 146 that `new-key` compares equally (in the sense of
> the comparator) to `key` would have also made sense. Thus, for SRFI 217,
> which is only concerned with integers and for which different integers that
> compare equally (in the sense of eqv?) are not interesting, I see a point
> to drop the `new-key` argument to the `update` procedure.

Entirely agreed.  If `update' doesn't insert a new element and simply
returns the arbitray `obj' argument, though, a better name should be
chosen.  (`pass', perhaps.)  John?

I'm not familiar with the details of the RB and HAMT sample
implementations of SRFI 146, but it seems that mapping-search is
vulnerable to the problem I described.  hashmap-search is
"non-primitive" and doesn't seem to be affected.

> The philosophy behind `mapping-search` was that all other accessor and
> mutator procedures of SRFI 146 can be naturally implemented/defined in
> terms of `mapping-search`, making it the universal accessor/mutator
> procedure.

That's always been my impression; so much so that I wonder if this
procedure, with its two layers of continuation passing, should be
exported at all.  If <thing>-search(!) *is* used as the fundamental
traveral procedure, it's critical that we resolve the issue with
`update'.

Thanks very much for your input.

--
Wolfgang Corcoran-Mathe  <xxxxxx@sigwinch.xyz>

"[I]t is only a minor overstatement to say that [Brouwer] would have
thought twice about crossing a bridge if its engineers had used the
excluded middle to prove that it could bear his weight."
--Gilles Dowek