Am So., 20. Juni 2021 um 01:26 Uhr schrieb John Cowan <xxxxxx@ccil.org>:


On Sat, Jun 19, 2021 at 8:57 AM Marc Nieper-Wißkirchen <xxxxxx@gmail.com> wrote:
 
Ad SRFI 113/153: If you want to turn SRFI 113's sets and bags inherently mutable, you should add the unordered analog of SRFI 146 to SRFI 153.

That seems reasonable, although I would prefer to make it a distinct SRFI.
Ad PFNs: If one imports, say, (srfi 113), how can one know whether the linear update procedures of the particular implementation actually mutate their arguments or not?

If the implementation conforms to PFN 4, or is the sample implementation, it will mutate them.  If not, the question is open.

Meaning code intended to be portable among SRFI 113 implementations has to ignore the PFN, so we would still be missing a fully imperative/mutative version of sets and bags.

BTW, shouldn't PFN4 of SRFI 113 deprecate the functional update procedures? I see no point in leaving them in as they are inefficient as they have to newly allocate every time.

(It would really be a smaller change to swap the sample implementation of SRFI 113 and to leave the API functional as a counterpart to SRFI 146.)