Closed exislow closed 1 year ago
Thank you! I will have a review now asap.
Do you have any comments or can we even merge it?
I did review it. Did you make it by a formatter? I would prefer to have a layout style that comes closer to Stroustrup’s and STL, Boost coding styles. Therefore, for a function I would do void do_something(void) { blalblabla }
instead of
void do_something(void) { blalblabla }
Can you setup that in your formatter? Please, see this guide for details: https://style-guides.readthedocs.io/en/latest/cpp.html
I really would come closer to Stroustrup’s style. I know, there is a lot of Hungarian notation. My fault. Call it evolution... ;-)
The code style refactoring was assisted by a formatter indeed.
You have mentioned Stroustrup’s coding style guide as well as https://github.com/povilasb/style-guides (https://style-guides.readthedocs.io/en/latest/cpp.html), which actually has 0 stars on GitHub. This seems to be not a very popular style. It is also awkward to have, e.g. a 8 spaces tab indent and function braces on a separete line but class braces on the same line.
A lot of more popular code styles have slightly better approaches. Maybe those code style guidelines (huge indents, braces on separate lines for readibility etc.) have been beneficial in the last decades, but with the vast majority of today's IDEs and it's highlighting techniques code readibility is better, if the code is not bloated by spaces / new lines. This fact is also supported by the default settings of different code formatters.
I would vote for braces on the same line instead of bloating up the code.
Can you provide me a link to the GitHub rating of code styles?
What do you mean exactly? Here are the very first results of https://www.google.com/search?q=GitHub+rating+of+code+styles
All of them suggest to keep it like this:
void do_something(void) {
blalblabla;
}
Ah I think I was confused by your story with the zero stars on GitHub. ;-) Actually I am totally fine with that what you made. The only point I would change is insert a newline before the opening brace of a function (and only of a function). This just taste. I am used to that. But if the majority is fine with the way you did it, then ok. I am not a fundamentalist.
Okay, cool. Thank you for your effort. Then I would appreaciate it, if you could just merge it this way.
Spoiler: I am already on some PRs regarding better UI/UX for the standard plugins incl. some easy importing functions for REW output.
As described in #117 I have done some code style refactoring. as you can see it complies with a majority of current C code style guidelines. The code is way more easier to read and maintain. Tell me what you think about it. Looking forward for acceptance of this PR, so I can continue pushing some features / ideas of mine. Thanks!