6 ms·
>I'd say most of modern C++ code isn't written with the performance goals that justify nonvirtual as default I am using C++ right now for embedded code but oth
by kristiandupont 12y ago
>I'd say most of modern C++ code isn't written with the performance goals that justify nonvirtual as default
I am using C++ right now for embedded code but otherwise I write mostly Javascript. There was a time when C++ was the standard choice of language for desktop apps etc., but that's hardly the case any more. You choose C++ if you need performance and control. And I think the "default means the least overhead" concept makes a lot of sense there.
Also, inheritance is a very central part of mostly all Java code whereas it's much less idiomatic (modern) C++. In C++, classes serve to give you RAII and you specialize with templates.