Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!mcnc!rti!xyzzy!throopw From: throopw@xyzzy.UUCP (Wayne A. Throop) Newsgroups: comp.lang.c Subject: Re: Conformant Arrays in C (the Fortran Hack) Message-ID: <669@xyzzy.UUCP> Date: 6 Mar 88 22:46:30 GMT References: <8802240725.AA22255@jade.berkeley.edu> <2739@haddock.ISC.COM> <662@xyzzy.UUCP> <731@cresswell.quintus.UUCP> Organization: Data General, RTP NC. Lines: 35 > ok@quintus.UUCP (Richard A. O'Keefe) >> throopw@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 !mcnc!rti!xyzzy!throopw