I've had a better look at the code you mentioned and I see what you mean: it
does look like the code there isn't so well structured.
Not only that, those very long two functions I mentioned differ in only one line. There are some other similar cases throughout the code.
I'd say the code needs re-factoring, pulling out the commonality as a common
function. Of course, one can do this with C++ (or OOP, in general) ideas;
but I'd say it should still be possible with C.
I'm honestly curious; in the specific case I've mentioned, how would you achieve the same result in C without code duplication and without degrading performance? In C++ you can do it very simply with a template and an inline function.
[...]
> Well Paul, as you said this is a hot topic so perhaps we would do well to
> avoid emotionally charged words such as "fanatical".
Sorry, that came out stronger than it was meant.
No problems ;)
> Most of the coding
> standard change was done fairly quickly using a code reformatter called
> Artistic Style and a simple Python script I wrote in half an hour.
Interesting... I didn't know of Artistic Style so I've booked marked it for a
better look when I get some spare time again.
In case you're curious, Artistic Style (which I used because it is supported by an Eclipse plugin) handled the re-indenting and re-spacing, and my Python script handled the change from "lowercase_with_underscores" to "mixedCase".
Well, looks like the fork is going ahead. I wish you luck with the C++
version and I hope the two projects can share ideas.
That's my hope too! And perhaps we will be able to attract C++ programmers who might not be interested in Fluidsynth otherwise.
Regards,