It's not an excuse, but languages definitely shape how you think, and C++ definitely encourages long functions and copy pasta.
It's not an excuse, but languages definitely shape how you think, and C++ definitely encourages long functions and copy pasta.
Once you are a C++ programmer for a while, you start to discern "standard" patterns for this sort of thing and tend to automatically use them. (The patterns might depend on the C++ version and to an extent the code base in question; but it is common to have such helper function take a const ref as input, return non-primitive return values via a out-parameter etc).
So while C++ might "encourage long functions", I think that may be the case only for newbies to the language. Once you have a some experience working with it, you no longer need to put that much thought in to every little decision.