4 ms·
I don't disagree with you per se. But I think you may be overstating the case. Once you are a C++ programmer for a while, you start to discern "standard" patte
by shadowfox 12y ago
I don't disagree with you per se. But I think you may be overstating the case.
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.