:: Re: [DNG] C source style [was vdev …
Top Page
Delete this message
Reply to this message
Author: Wm. Moss
Date:  
To: dng
Subject: Re: [DNG] C source style [was vdev status update in daedalus]
On 30/07/2025 14:02, aitor wrote:
>
> Hi,
>
> On 30/7/25 11:36, Didier Kryn wrote:
>> Therefore, IIUC, they assume inconsistencies in the position of the
>> openning brace with respect to line-break and indentation.
>
> Not only Linux, but also FreeBSD, Xorg and Wayland
>
> Personally, I find this exception reasonable because functions with a
> long argument list often require to be broken into smaller chunks:
>
> structevent_source *
> event_loop_add_signal(structevent_loop *loop,
> intsignal_number,
> wl_event_loop_signal_func_tfunc,
> void*data)
> {
> body of the function
> }
>
>> Their problem... with all due respect for their great work.
>
> Linus Torvalds was less polite (the document seems to be written in 2016):
>
> "First off, I'd suggest printing out a copy of the GNU coding
> standards, and NOT read it. Burn them, it's a great symbolic gesture."
>
> Cheers,
>
> Aitor.
>
>
>
> _______________________________________________
> Dng mailing list
> Dng@???
> Manage your subscription: https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> Archive: https://lists.dyne.org/lurker/list/dng.en.html


AT&T Bell Labs had a recommended programming standard. The start meta
character was placed under the logical expression or function. That is,
the code block started on its own line and in the leftmost column. Other
recommendation were for an indent of 3 or 4 (we all used 4, half a tab)
and a file heading that could be processed by troff.

Code was very legible; a requirement when the complexity is very high.
Since we performed regular peer reviews, spaghetti code was minimized no
matter the coding language.

Regretfully. the psychology of interpreted BASIC and the self taught
programmer has won out.

I still have my Bell Labs Programmers Work Bench manuals and the coding
standards. While rather out of date, C Programming Guidelines by Thomas
Plum is a worthwhile read.

--

William (Bill) Moss
bill.m.moss@???
NY (USA)