Why exceptions for error handling is so important

via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 12 13:51:00 PST 2015


On Monday, 12 January 2015 at 21:34:20 UTC, Paulo Pinto wrote:
> But then it hit me, many of the issues are caused by the 
> compatibility with C semantics and the pay only for what you 
> use mantra.

Yeah, C++ exceptions were originally so troubled that no sane 
person would use them, thus you did not get the culture where 
most code was designed for it and "C++ with no exceptions and no 
rtti" became a mantra... For exception handling to shine you need 
consistency backed by culture. It is probably the culture around 
languages like Java and Python that foster that.

(Most of std::C++ is optional, templated and inefficient... There 
is no consistent culture. Though they got some thing right with 
unique_ptr and new language features recently.)


More information about the Digitalmars-d mailing list