3 ms·
This is probably a reasonable point in a subset (and mindset, frankly) of C++ that has very little overlap with the subset of C++ I use. Every C++ codebase I wo
by keldaris 6y ago
This is probably a reasonable point in a subset (and mindset, frankly) of C++ that has very little overlap with the subset of C++ I use. Every C++ codebase I work on has RTTI (and exceptions) disabled immediately, so dynamic_cast isn't even an option. If it was, I would consider any use of dynamic_cast to be a bug because of the egregious performance implications. The correctness concern should be addressed either at compile time (either by construction, i.e. CRTP over runtime polymorphism or by other means) or by tests. Obviously, I'm extremely biased on this, because performance is effectively the primary (and often only) reason I use C++. In other domains, YMMV.