I often see C and C++ questions where the coding style in some of the answers is different from the one in the question. While some languages have guidelines concerning the coding style (Java, Python, etc...), some don't have any strict guidelines concerning the coding style (C, C++, etc...), therefore, several coding styles may differ and none of them will be "better" (unless there is a good reason to use a coding style rather than another one, e.g. consistency with a specific library coding style).
When a question is posted with a valid and consistent coding style, should we try to respect this coding style in the answer? I often see answers that propose snake_case
functions to questions where a consistent camelCase
is used for function names, or answers where the indentation style does not match the one used in the question.
I think we should somehow encourage Code Review users to be as consistent as possible with the coding style used in a question when they answer it. It would also probably be easier for the asker to understand answers written with their coding style.