SRFI 268: Multidimensional Array Literals Arthur A. Gleckler (31 Mar 2026 03:29 UTC)
Re: SRFI 268: Multidimensional Array Literals Per Bothner (31 Mar 2026 15:07 UTC)
Re: SRFI 268: Multidimensional Array Literals John Cowan (02 Apr 2026 00:45 UTC)
Re: SRFI 268: Multidimensional Array Literals Per Bothner (02 Apr 2026 01:14 UTC)
Re: SRFI 268: Multidimensional Array Literals John Cowan (02 Apr 2026 02:16 UTC)

Re: SRFI 268: Multidimensional Array Literals Per Bothner 31 Mar 2026 15:07 UTC

A paragrph pointing out the differences from SRFI-163 (along with a rationale for the differences)
seems desirable.

I agree with Peter McGoron that an EBNF grammer (as in SRFI-163) would be desirable.
Assuming I've read the specification right, perhaps something like:

array-literal ::= array-literal-header datum
array-literal-header ::= "#" vectag array-bounds | "#" rank vectag
array-bounds ::= "(" array-bound* ")"
aray-bound :: "(" lower-bound upper-bound ")"
vectag ::= "a" | type-tag

There seems to be a problem if a SRFI-4 type-tag is used:
How do you specify array-bounds without it being confusible with the datum?
Perhaps a presence or absence of a space before the datum? Though that has
other problems.

Should perhaps require array-bounds for empty arrays.

Perhaps include more examples of the different kinds of empty arrays.
While they have limited usefulness (except perhaps as starting values for
iterative appending), a spec should be explicit about edge-cases.
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/