[COFF] C with Improvements :-)
Peter Yardley
peter.martin.yardley at gmail.com
Mon Jun 23 11:52:02 AEST 2025
Yes,
I hate the dangling brace I line my braces up with the associated code block …
if (…)
{
blah blah blah;
}
And I always put my variable declarations on separate lines.
> On 23 Jun 2025, at 11:25 am, Dave Horsfall <dave at horsfall.org> 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
>
> to make it clear that "p" is a pointer to an int. Heck, I've even seen
> such nonsense as this (fixed width font required!):
>
> int *a;
> int b;
>
> to make the names line up.
>
> And OK, not syntactical, but I loathe the dangling "{" as typified by K&R:
>
> if (...) {
> ...
> }
>
> All the arguments I've seen for this style are utterly specious,
> especially the one about saving a line on the screen; if so then why not
> move the "}" up to the end of the preceding statement and save another
> precious line?
>
> -- Dave
.1.3.6.1.4.1.8852.4.2
Peter Yardley
peter.martin.yardley at gmail.com
More information about the COFF
mailing list