Variable-length array parameters in NCEG C
Thomas M. Breuel
uunet!idiap.ch!tmb
Wed Jul 8 00:33:35 PDT 1992
Robert Jervis writes:
> This debate has been circulating for several years now. It shows little sign
> of converging on a single solution. The only real forward progress that
> seems to have been made is to settle on a few requirements of any solution:
> [...]
> - Structures with variable dimensioned arrays are NOT needed.
I disagree with that assessment. They are needed. Whether they can be
added feasibly to the C language is another question.
> I think that one of the issues that has worked against the Ritchie
> proposal (despite the fact that it covers all of these points now) is
> the fact the Ritchie's variable array pointers is that they include
> descriptors at runtime (at least one integer for each variable dimension).
> The alternate proposals fix the dimensions statically as part of the
> declaration, so descriptors are only needed if the bounds expressions
> change during the lifetime of the array. This should tend to make the
> storagusage and code generation a little better than with the Ritchie
> proposal.
>
> At this point, I don't think very much new light will be shed on the
> debate. We are quibbling over syntactic issues for the most part. Sooner
> or later we need simply to accept something and move on.
Personally, I probably like Ritchie's proposal the best as well. Too
bad it's out of his hands...
Still, any kind of multidimensional arrays, even the pedestrian
FORTRAN arrays, is better than nothing at all.
Thomas.
More information about the Numeric-interest
mailing list