On Mon, Jun 23, 2025 at 11:25:22AM +1000, Dave Horsfall wrote:
On Mon, 23 Jun 2025, Warren Toomey via COFF wrote:
[...]
Rather than talk about alic, reply with what you
like/hate about your
favourite language!
This will probably get me tarred and feathered, but I have a couple of
gripes about C:
Declaration of pointers: these days I prefer to write
int* p;
instead of
int *p
Dave, you are not alone, I do the same thing. So you can't do
int* p, i;
you have to do
int* p;
int i;
And I think it is much more clear.
This is sort of my high horse but I pushed my people for 18 years to make
the code more clear. I told people over and over, you write once or twice,
you read many, many times. So if it is really hard to write code clearly,
but it is really easy to read? Do that.
For what it is worth, when I manage to get someone to read the BitKeeper
source, the reaction is that is really good C code. I'm proud of that.
--lm