Final discussions Bradley Lucier (11 Apr 2022 22:49 UTC)
Re: Final discussions Alex Shinn (22 Apr 2022 08:55 UTC)
Re: Final discussions Bradley Lucier (05 May 2022 15:26 UTC)
Re: Final discussions Alex Shinn (05 May 2022 21:35 UTC)
Re: Final discussions Bradley Lucier (26 May 2022 18:52 UTC)
Re: Final discussions Alex Shinn (29 May 2022 20:59 UTC)

Final discussions Bradley Lucier 11 Apr 2022 22:48 UTC

Dear Colleagues:

I can't think of anything to improve about this array SRFI, so without
further feedback I'm OK with finalizing it, but I'd like to mention
previous comments that are, to my mind, as yet unresolved;

1.  A better name for array-elements-in-order?.

2.  Syntax support for comprehensions.

3.  multi-array fold: array-foldl and array-foldr take only a single
array argument.  If one wanted to apply array-foldl to multiple arrays,
with operator

(op id a_1 a_2 a_3 ...)

and identity id, one could (somewhat clumsily)

(array-foldl (lambda (id lst)
                (apply op id lst))
              id
              (array-map list A_1 A_2 A_3 ...))

array-foldr is a bit clumsier, with more structuring/destructuring of data:

(array-foldr (lambda (id lst)
                (apply op (append lst (list id))))
              id
              (array-map list A_1 A_2 A_3 ...))

Of course, applying op could be specialized if one knew ahead of time
the number of array arguments.

4. array-fold vs array-foldl: I somewhat arbitrarily changed array-fold
in SRFI 179, whose operator is called as (op x id) (so the accumulator
is the right argument), to array-foldl, whose operator is called as (op
id x).  This seems more natural to me (of course, since otherwise I
wouldn't have changed it), and there are arguments online for doing it
both ways.  I don't believe there's yet been a discussion on this list
of the change.

Brad