This one bit me today

dougp at voodoo.ucsb.edu dougp at voodoo.ucsb.edu
Sun Oct 22 15:43:58 AEST 1989


-Message-Text-Follows-
In article <11368 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn) writes...
>No, to take an analogy:  I wouldn't want to encourage smoking, because it's
>not healthy, even though so long as it's done in private I wouldn't outlaw
>it either.  Supporting nested comments in C constitutes active encouragement
>of an unhealthy practice, and I recommend against compiler vendors doing it.

So you recomend that compiler vendors make no inovations? You would not
now have function prototypes or the void type, two of the nicest aditions
to the C language if it wern't for nonstandard enhancements to C
compilers. If I remember correctly these were not in the K&R definition
of the C language, but they appeared in many C compilers before the
ANSI commitie blessed the practice. I am all for nonstandard enhancements
 That is how new features get added to the language. They first appear
in a nonstandard C, if they are no good, nobody uses them, if they are
good people will start complaining if they arn't in the compiler they
are using untill it gets added. Thus good features proliferate and 
bad ones die. It's called evolution.

Besides, quite a bit of code is written that is and must be hardware
specific (can you say int far *?) infact most applications on PC's
are written in a machine specific manor. (Have you looked at Macintosh,
Windows, Atari ST/GEM, or Amiga/Intuition code?)

As for nonstandard features, here are two I'd like to see for the
preprocessor:

A #define that would replace text even within tokens so I could
do something like

#define @ *

and @ptr would be translated to *ptr. This would also be nice for
those who are foreced to use triglifs, they could substatute a charactor
in their own charactor set for a triglif and not have it die when they
are tring to do something like {a=x} (Whitespace lovers please don't
waste a lot of bandwidth on this, sometimes it is clearer without
whitespace)

I'd also like to see /# comment #/ as the nested comment charactor
(can anyone think of a way /# or #/ would look like some other 
operation like /* can?) maby /* */ can be sent the way of =*

Douglas Peale



More information about the Comp.lang.c mailing list