On 16/10/11 3:00 PM, Eric Smith wrote:
Chuck Guzis wrote:
Not the same at all. I don't believe that in
C I can declare:
bit anything[60000];
Standard C provides one predefined data type that is semantically a bit,
which is _Bool. ...
It would have been nice if C had offered a packed array type, such that
in a packed array of _Bool each component would occupy only one bit of
storage. The difficulty that arises from that is that you can't have a C
pointer to one of those bits (unless a new kind of C pointer is
invented), and that it breaks the semantics of the indexing (square
bracket) and dereferencing (unary *) operators.
Wouldn't a real macro system be handy!
--Toby
That's not to say that
it couldn't be done, just that it definitely will complicate the
language definition significantly. One could argue either way about
whether that complication is justifiable.