MorleyDev, a rose by any other name is still a rose.
Nexus,
that's revisionist history, inheritance/type based polymorphism had been a part of C++ for 15+ years at that point.
In general, code was not written like that because people were just starting to figure out the ramifications of the "new" C++ standard, it was written like that because as an industry that sort of architecture was a best practice. C++ developers didn't start preferring composition over inheritance,
the industry did.
Todays best practice is tomorrows mistakeIt is a fallacy to say "look, maintainability regards led to these bloated hiearchies, therefore it is better if we do not do it". You can't just leave out all the cases where intense planning resulted in good code design.
You are not understanding me.
maintainability and scalability arguments are roughly the same in terms of usefulness. Here's what I mean.
We need to do X because it's more scalable
vs
we need to make sure we can handle 10k concurrent users even though we're only estimating needing 3k concurrent users. The business leaders tell us they expect us to double in size over the course of the first 6 months, that should give us breathing room.
One of those will lead to much better decisions than the other.
Likewise with maintainability.
We need to do X because it's more maintainable.
vs
We need to make sure this algorithm can be changed out easily since we're not sure exactly what the performance requirements are, but we know that this is going to be integral to said performance.
And look at the counter-argument
we don't need more maintainability.
vs
No, I don't think that piece is going to be the bottleneck for performance. Why don't we stay simple, slap this algorithm in, but with the idea that we may need to abstract it later. We'll get something up and running quickly and then test, because I think we're going to find the performance bottleneck is going to be the DB I/O, not the number crunching.
One of those leads to a more valuable discussion.
Which is why I say, if the only argument you have for doing a thing is that it's "maintainable" or "scalable", or "readable", then you have no argument.
Lets write tests because it's changeable. vs We're writing accounting software, which can get our asses sued, so for the calculation module, we're going to Unit Test. We're also going to implement code reviews, but only for this module because both of these things have an up front cost that isn't worth it for the rest of the application. risk vs reward.
What tends to happen is that when people don't have the knowledge either due to inexperience or external factors (business doesn't know what's going on, the software is new, what have you), you need to be making concrete decisions based upon
that lack of foreknowledge, not based upon 'maintainability', et al.
And that's the context we're speaking in, someone who is learning. It is better to stay simple, and refactor mercilessly, than to wax poetic about how you have 90% test coverage.
It's all about making good decisions, and basing your decisions on something as nebulous as "maintainability" rarely turns out to be good.