Re: [hatari-devel] Coding style

[ Thread Index | Date Index | More Archives ]

Le 02/05/2020 à 17:55, Thomas Huth a écrit :

Hmm, I guess 10 or 15 years ago, I'd screamed "heretic idea!" now, but
acutally, I've done quite a lot of QEMU and Linux kernel development in
my job in the past years, so I'm fine with both coding style nowadays
(I just dislike mixing the style in one file - that's really too

Nicolas, what's your opinion?


at work, I prefer having braces on different lines, with '{' and '}' aligned on the same column as I find it easier to identify where a long block of code starts/end. As this seems to be the default for Hatari, I'm OK with that.

I'm fine with the idea that different parts of Hatari came from different projects and we keep the style of the original project (for example WinUAE), but I'd rather keep the current style in Hatari without changing it and not apply a common style to every file. WinUAE has its style, the external disassembler has its style (even if we plan to deprecate it), they are "3rd party" parts of Hatari, so their style can differ.

For large part of code, I think we should keep the style that was chosen by the "main" dev of that part, because he's likely to maintain it and it can be more efficient to write/debug code that matches your coding style and your "way of thinking" instead of enforcing to a different style (assuming the dev submitted at first a file that matches the coding style for Hatari)

But I agree we should avoid mixing different style in the same file (even if sometimes a few lines get a different style due to lack of attention)


Mail converted by MHonArc 2.6.19+