First off I want to say that I really appreciate the post of the JUCE coding standards, which I have mostly already been doing anyway or adapted over time. The only thing I find weird is the parentheses formatting.
If you follow the JUCE coding standards, you should write parentheses without content directly after the word, without a space, but with content, they should have a space before them:
ClassOne classOne = new ClassOne(); ClassTwo classTwo = new ClassTwo ("Some argument");
so far so good. I’m not gonna argue that this looks bad. But here come some edge cases:
classTwoUniquePtr.reset (new ClassTwo ("Some argument"));
looks a little bit weird to me. It gets more extreme with this:
classTwoUniquePtr = makeUnique<ClassTwo> ("Some argument");
I somehow find that very weird looking… Also if you have a chain of methods:
just looks wrong to me! Also every IDE I have encountered up until this point can’t handle this. Its either space before all parentheses blocks, or no space! There is no handling for parentheses with content, and without, also it defaults to no space before them.
I would love to hear some opinions on this. Have you adapted this coding standard in your own code? (Not arguing about the JUCE code base, but rather individual projects using most of the coding standard.) This is the one thing I haven’t adapted to my own code base yet and it kinda bothers me as I’m not sure if there is a good reason to do so … Can someone using this give me some reasons why I should too / should not use this?