Conformant Arrays in C (the Fortran Hack)
Wayne A. Throop
throopw at xyzzy.UUCP
Mon Mar 7 08:46:30 AEST 1988
> ok at quintus.UUCP (Richard A. O'Keefe)
>> throopw at xyzzy.UUCP (Wayne A. Throop)
>> Now it seems to me that, allowing non-constant expressions in the bounds
>> of formal array arguments is the minimal, conservative, non-dope-vector,
>> covers-most-bases solution.
> What are the differences between this and the C.A.P. proposal, other than
> the fact that GNU CC is said to support it, so that this proposal *is*
> prior art, and the C.A.P. proposal isn't?
>
> (1) This is exactly the Fortran approach. There is lots of experience
> with it, and the numerical people for whose sake the C.A.P. proposal
> was made will already be familiar with it.
This first point hits the nail directly on the head. At this stage of
standardization, it seems a Bad Idea to build a paper-mache feature on
top of a plaster-of-paris patch to a weak point in the original K&R
version of the language. I mean, we are treading on ground related to
array "promotion" to pointers to start with, and are tacking on dubious
and unproven syntax in a newly-proposed portion of the language
(prototypes), and an area for which alternative proposals are likely to
be made (for handling passing arrays by-value, for example). This
definitely seems the wrong time to be tinkering around in this
particular area in this particular fashion. Allowing non-constant
expressions in this context doesn't alter the syntax much, and seems a
safer step to take.
But of course, I'm *really* upset that nobody blanched at my
demonstration of how to shoehorn a loop into the body of a
value-returning macro, to get iterated by-name evaluation. I guess you
folks have stronger stomachs that I gave y'all credit for...
--
The LISP programmer knows the value of everything, but the cost of nothing.
--- Alan J. Perlis
--
Wayne Throop <the-known-world>!mcnc!rti!xyzzy!throopw
More information about the Comp.lang.c
mailing list