[comp.lang.c] syntactical convenience

kruger@whyvax.dec.com (Bear with me) (03/12/88)

It's minor either way, but syntactically, it would be nice if you could
define a bunch of same-sized bitfields in one shot. For example:

struct
{
  bit(1) x,y,z;
}

The current system does not convey the meaning as clearly, and is longer and
more obnoxious. Of course, it's only an inconvenience either way.

A more important addition, and a surprising lack in the standard, is the
preprocessor, which doesn't allow inserting preprocessing directives. Our
standards rep had no good arguments against adding the capability, which is
no harder to implement and breaks no programs. He simply said it was unlikely
to change at that point -- not very satisfying.

An example of what I am referring to is:

#define TBD	#error



/* this code is not complete yet */
TBD


Of course, this is not the only use of this feature. It is even more surprising
that recursive definitions are not permitted -- the line has to be rescanned
anyway, and it's just as much work. Ah well....

dov

Disclaimer: Your mileage may vary. Void where prohibited. Weight is before
cooking. Digital is not to be held responsible for my madness.

henry@utzoo.uucp (Henry Spencer) (03/13/88)

> A more important addition, and a surprising lack in the standard, is the
> preprocessor, which doesn't allow inserting preprocessing directives. Our
> standards rep had no good arguments against adding the capability, which is
> no harder to implement...

Not all implementors would agree.
-- 
Those who do not understand Unix are |  Henry Spencer @ U of Toronto Zoology
condemned to reinvent it, poorly.    | {allegra,ihnp4,decvax,utai}!utzoo!henry