ANSI C suggestions
Jon Corbet
jon at boulder.UUCP
Sat Oct 13 10:41:15 AEST 1984
As long as we are discussing improvements to the language, I would
like to suggest a couple:
(1) Get rid of that requirement that all floating point arithmetic
be done in floating point. Here at NCAR, we have applications
that need to quickly crunch a few megabytes of data and get it
to the display, while the scientist is sitting there twiddling
his thumbs and wondering if the programmers should get raises
after all. 32 bits is plenty of precision for our calculations,
and the double precision slows things down enough that our
math intensive routines are still written in (UGH!) FORTRAN.
This is a drag, since I really campaigned hard for a C compiler,
and I still have to use FORTRAN. I don't care if I have to
set a compiler flag or whatever, as long as I can use single
precision arithmetic.
(2) The DEC C compiler allows a "readonly" designation on global
variables. This is handy to insure that one does not overwrite
static lookup tables and such. VAX type machines can easily
implement readonly variables. I suggest that readonly should
be part of the language in much the same way as register
variables -- i.e. the compiler does not have to implement things
that way if it is in a bad mood or the machine does not
support it.
--
Jonathan Corbet
National Center for Atmospheric Research, Field Observing Facility
{hplabs|seismo}!hao!boulder!jon
More information about the Comp.lang.c
mailing list