volatile (in comp.lang.c)
mcdonald at uxe.cso.uiuc.edu
mcdonald at uxe.cso.uiuc.edu
Fri May 6 00:48:00 AEST 1988
>I know has argued that something like "volatile" isn't useful.
>There's no doubt that it is. The question is whether it belongs in ANSI C,
>which purports to be a standard for a language for portable programs.
>The problem is that volatile means many different things to different people.
>Until then, though, let's restrict the standard language to things that we
>know how to make portable.
I strongly disagree that the definition of a language should be restricted
to "portable" things. I think that portability, per se, is a desirable
goal with a very low priority. Speed, more speed, lots more speed,
a friendly user interface, and general usefulness are much more important.
A large fraction of programs today are likely being written for
environments like the IBM-PC and the Mac which are connected to specific
hardware and operating environment. Most portable programs run on those
machines are decidedly inferior to ones written specifically for them.
I believe that a language, per se, should be divided into a "portable"
part and a language-specified non-portable syntax. I feel that what
has been done to C by the ANSI committee is quite exemplary. "Volatile"
is a generally useful concept, and seems to me to indicate something
useful in enough cases, and also fits nicely into the declaration
syntax of the language, that it should stay. I would personally
like to see compiler vendors allow inline assembler. For that,
a "pragma" would do. The big plus for leaving volatile as-is is that
vendors would be FORCED to allow some sort of machine-specific code.
It isn't far enough for me, as some vendors are going to make it
impossible to ADDRESS the part of memory where the interesting locations
lie. The only thing I can do about that is to complain, and not buy
their products.
Doug McDonald
"I want a nifty program, not a portable one"
More information about the Comp.lang.c
mailing list