Re: #\a octothorpe syntax vs SRFI 10
bear 05 Jan 2005 06:24 UTC
On Tue, 4 Jan 2005, Aubrey Jaffer wrote:
> | Date: Tue, 4 Jan 2005 13:42:08 -0800
> | From: "Bradd W. Szonye" <xxxxxx@szonye.com>
> |
> | bear wrote:
> |
> | Also, brackets have one major shortcoming (which the current SRFI
> | 58 proposal shares): Since dimensions are inferred from the bracket
> | contents, there's no way to represent arrays with a 0 dimension.
>The updated SRFI-58 provides clarification about rank 0:
True, but that's only one of the two degenerate cases.
General arrays have two degenerate cases. First, when
there are no dimensions (what you're calling a "Rank 0"
array). In that case there is one element.
Second, when one or more of the dimensions has a size
equal to zero. In that case there are no elements.
The dope-vectored syntax can handle both of these cases.
We can write
#A <val> for a zero-dimensional array, just as the
current proposal recommends, and
#0*3*2A() for a rank-3 array with one zero dimension.
Honestly, I'm not really sure how important it is to get
these cases right, although together they're a powerful
argument for the dope-vectored syntax.
My question is, how useful are such things as static arrays?
I don't envision writing such arrays as part of source code.
These are "mere" external syntax rather than source syntax,
IMO. As such, I'd insist on *having* an external representation
but I don't much care if the notation is flabby and verbose.
Bear