Coding style
I normally don't comment on code style, but since Monado is still a relatively new project, there's a chance it won't be in vain. The coding style here is kind of rough.
- Aligning arguments makes it difficult to keep to 80 cols
- It's more difficult for humans to write code in aligned style
- Mixing tabs and spaces is a recipe for disaster when different editor configurations are used, and is difficult for humans to write
- The code style cannot be succinctly summarized in an
.editorconfig
file, making contributors resort to a less productive clang format cycle - Forward declarations of all static functions in a file is difficult to maintain, as you have to update two places - better to just order the file properly and use forward declarations only when necessary to resolve circular references
Coding styles should be enforced by a computer but should be easy for humans to pick up so that they can write code correctly the first time. I appeal to the Linux kernel as an arbitrary authority on how C code should look. Their style guide is here:
https://www.kernel.org/doc/html/v4.10/process/coding-style.html