Conformant Arrays in C

Henry Spencer henry at utzoo.uucp
Fri Feb 26 05:07:37 AEST 1988


>      Recommendation: Fix, by language design  if  necessary,
> the  treatment  of  arrays  in  C  to  properly  accommodate
> multiply-dimensioned arrays whose  dimensions  vary...

This is an interesting idea, and fortunately you are just in time to have
some chance of getting it into the next revision of C, five years or so
hence.  Here's what you do:

	(a) implement it in a C compiler
	(b) use it, and have others use it, for a few years
	(c) write it up and submit it formally

I guarantee that if you follow these steps, IN THE ABOVE ORDER, X3J11 will
at least listen attentively when you propose it.  Note that writing up the
proposal and submitting it comes after you've tried it out, *in C*, not
before.

(Yes, X3J11 has done a few things that have not been based on prior
experience.  Conformant arrays are arguably a better idea than, say,
noalias.  This is not much of a recommendation, however, since noalias
is increasingly looking like the biggest mistake X3J11 has ever made.)

Alternatively you might consider doing it in C++, which probably won't
require any compiler changes at all.  X3J11 has never claimed that C is
the answer to all mankind's problems.  You will be listened to *more*
attentively if you can explain why C++ does *not* solve your problem.
-- 
Those who do not understand Unix are |  Henry Spencer @ U of Toronto Zoology
condemned to reinvent it, poorly.    | {allegra,ihnp4,decvax,utai}!utzoo!henry



More information about the Comp.lang.c mailing list