I noticed in recent posts that auto is used to replace rather simple types, for example in this commit:
`- const String faceStyle (font.getTypefaceStyle());
- auto faceStyle = font.getTypefaceStyle();`
`- float w = getTypeface()->getStringWidth (text);;
- auto w = getTypeface()->getStringWidth (text);`
In both cases it isn’t clear to the user (at least the ones not too familiar with JUCE) what type it is and in the first case it also removes constness. The saving of typing on the other hand is rather small, especially if the
const String in the first place would be replaced by
const auto. While I like the general JUCE coding style very much I’m not so enthusiastic about this. Maybe you can elaborate why I’m horribly wrong here.
The JUCE coding standards also don’t comment on the auto keyword.