[OT] - C++ exceptions are becoming more and more problematic

meta meta at gmail.com
Thu Feb 24 00:34:01 UTC 2022


If the fundamentals of the feature are to be rethought / 
redesigned because considered harmful (performance penalty is 
harmful, at least to me), then the users must be prepared and 
educated, so they understand the motive of a potential change, 
and can design APIs with that in mind!


That is how we build future proof libraries, and not "oh, i now 
need to port all that code to a newer language with newer 
constructs" kind of situations..


It's not like the world depends on D, it's a niche market, we 
could, and we should use that to our advantage and move forward, 
without being scared of hurting some people, we can still have a 
long upgrade path, with a solid deprecation model, and some 
static analysis tools in case we still need to depend on a 
library that uses the old model..


C didn't need any of that, reason why it is universally adopted, 
languages depend on it, and is still kicking today!

So the question is why should we even need exceptions? let's 
continue the idea that D is the natural evolution of C, and 
improve on its error handling model with better way to represent 
error codes instead!

My 2 cents..


Sorry for the consecutive posts btw.. :D


More information about the Digitalmars-d mailing list