Earlier quoted context omitted.
In my experience, the answer is always "It Depends." That's about the only thing that I can hang "always" on. It really depends on the exact type of code we're working with, and what our objectives are. In my case, I often use object inheritance. It's a damn cheap way to DRY. However, when people hear "inheritance," they often think "polymorphism." There's a really big difference between the two, but popular culture…
> In my case, I often use object inheritance. It's a damn cheap way to DRY. However, when people hear "inheritance," they often think "polymorphism." There's a really big difference between the two, but popular culture has jammed them into one ball, and it's not worth the agita, to try to explain the difference. I agree that we should think of inheritance and polymorphism separately. If we want to express this intent…
This is especially true, with languages like C++. Someone (I have heard it attributed to Bjarne, but I don't think he said it) said "With C, you can shoot yourself in the foot. With C++, you can blow your whole leg off."
But there's stuff that can basically, only be done in C++. It's a very powerful, mature, and storied tool; meant to be used by competent grownups.
In tech, we have folks that seem to be absolutely convinced that we can have tools, so marvelous, that we can hire total incompetents, and that they will magically write good code. I know of no other engineering discipline, or craft, where people think like this. They usually have rigorous career ladders, with lots of gates.
Maybe Finance sometimes lets knuckleheads behind the wheel, but then, you get things like the Barings Bank disaster.
"What's Barings Bank?" you ask. "It doesn't exist! Is it a hallucination?"
No, it is not. Unfortunately, they let a rather junior trader, named Nick Leeson, behind the wheel...
It's possible that LLMs may finally give us something like what people want, but I suspect that we'll be seeing folks stumping around on one leg...