Dear John:
Thank you for making this document. I have a few comments.
The first, and biggest, is that almost immediately after SRFI 122 was
finalized, I realized that I had left out array-assign! (as you point
out in item (4) below). In my programming style, I just didn't need it.
So I started working on more examples to see what else might have been
left out, and hosted a fork of SRFI 122 at
https://github.com/gambiteer/srfi-122
with my changes, with the idea of some day introducing a superseding
SRFI. (And not taking forever to finalize it.)
The forked version of SRFI 122 explains:
==================================================================
This document, the associated implementation in generic-arrays.scm, and
the test file test-arrays.scm differ from the finalized SRFI-122 in the
following ways:
The abstract has been rewritten to make it more precise.
The procedures interval-for-each, interval-cartesian-product,
array-outer-product, array-tile, array-assign!, and array-swap! have
been added.
The discussion of Haar transforms as examples of separable
transforms has been corrected.
The documentation has a few more examples of image processing
algorithms.
Some matrix examples have been added to this document and
test-arrays.scm.
==================================================================
These changes are documented at the github repo listed above.
array->vector was another routine I was considering, but hadn't decided
if it was worth adding.
So I don't know when this vote will take place, but I have time in the
next month or so to devote to proposing and (hopefully quickly)
finalizing a better version of SRFI 122.
Some specific responses:
On 11/30/19 5:06 PM, John Cowan wrote:
> 4) SRFI 122 has no general-purpose setter functions such as array-set or
> array-copy!, so all array mutation must be done through the array's own
> setter function, which can be obtained via SRFI 122's extensive
> introspection procedures. SRFI 164 has general-purpose setters but has
> less introspective ability.
SRFI 122 indeed lacks array-copy!, but array->specialized-array makes a
new copy of an array as a specialized array.
> 5) SRFI 122 provides more convenience functions than SRFI 164, including
> in particular a lazy array-map operator that, given an array and a
> mapping function, provides an array of the second kind.
I find the convenience procedures in the section "Common transformations
on Bawden-style arrays", which define to be the most important for
practical applications.
Brad