B
Ben Bacarisse
BartC said:"Ben Bacarisse" <[email protected]> wrote in messageFor the record, I *like* C's declaration syntax and, left to my own
devices, I'd be very happy to declare
char buf[SIZE], *start = buf, c = *buf;
This is actually confusing; I wasn't sure what sort of pointer c was
supposed to be at first, as I read it as c = &buf..
There is always a tension between writing clear code and using the
language to it's fullest extent. However, to quote you from another
post in this thread[1]:
| I'm not a C programmer.
so I am not sure what weight to give to your confusion. It would be
wonderful if all programing languages were clear to everyone -- even
those who were not familiar with them -- but I don't think that this is
possible.
I'd be prepared to say that "mixed" declarations (declarations with
multiple forms of declarator) were considered idiomatic in "old" C. I
remember coming across the advice of having one declarator per
declaration quite late and thinking it rather odd and fussy.
Not needing to declare variables is even more compact...
True, but we are talking about C and removing declarations can't be done
in C.
If you mean you can declare arrays, pointers and single characters all
in the same statement, then I suppose it might be. But not everyone
would agree it's a good thing.
Oh sure. That's why I said "left to my own devices". I'd do it in
"house style" if I were ever to do that kind of job again.
[1] Message-ID: <[email protected]>