Le 19/07/2025 à 13:06, aitor a écrit :
> On 19/7/25 12:48, aitor wrote:
> At this point, I have a doubt about which coding style is more acceptable. It seems
> to me that eudev uses the kernel coding style, except for namely functions, that should
> have the opening brace at the beginning of the next line, thus
> int function(int x)
> {
> body of function
> }
> instead of:
> int function(int x) {
> body of function
> }
The second fashion is the style imposed in nearly all projects,
including the Linux kernel. The understated logic is that the
indentation is a consequence of the openning bracket, and, therefore,
logically appears after. This is thinking like a parser program.
My preferred style is the first because it is more readable, and is
thinking like a human beeing.
-- Didier