I think it’s bad for shared code that is or may be worked on by a number of people, or if the codebase is really big. But at that point many other things need to be or be not done, which may imply not only more code, but also code that is more difficult to work with for someone in particular. For example, I follow JUCE formatting in the forum, but I don’t use it in my private projects -it makes too little code visible on my screen for the text size I need to be able to read it. My interfaces are not perfect either -they would need some forwarding and maybe a facade, and I don’t document everything. In this case, I can’t use in-class initializers because I forward arguments from the parent’s constructor. The choice is between initializer lists or init() methods. For shared code, I’d go with the first. For example:
: min { lnf.roundedLeft, 1.0, 0.5, 500, 1000 },
rng { lnf.roundedRight, 1.0, 0.5, 500, 1000 },
band { lnf.roundedLeft, 1.0, 1.0, 96, 144 },
length{ lnf.roundedRight, 0.1, 0.05, 250, 500 }
{
addAndMakeVisible (min);
addAndMakeVisible (rng);
addAndMakeVisible (band);
addAndMakeVisible (length);
or
addAndMakeVisible (min .init (lnf.roundedLeft, 1.0, 0.5, 500, 1000));
addAndMakeVisible (rng .init (lnf.roundedRight, 1.0, 0.5, 500, 1000));
addAndMakeVisible (band .init (lnf.roundedLeft, 1.0, 1.0, 96, 144));
addAndMakeVisible (length.init (lnf.roundedRight, 0.1, 0.05, 250, 500));
Also, with init() I can see what those numbers are by hovering over the method’s name, which can’t be done with initializers.