3 ms·
Not having exception is not having incorrect code i.e. code that does not throw. This is very hard to do in languages that naturally throws exception like Java
by kajaktum 4y ago
Not having exception is not having incorrect code i.e. code that does not throw. This is very hard to do in languages that naturally throws exception like Java or C/C++. If you have errors as part of the contract however...now you can be sure (or surer) that the function you are calling does not fail.
- mcqueenjordan 4y agoI think most serious C++ shops are probably compiling with -fno-exceptions.
- tsimionescu 4y agoThat is entirely false. You can barely even use half the language without exceptions.
- mcqueenjordan 4y agoI don't really know how you'd falsify the claim (it's not particularly falsifiable), but I'm open to being wrong... That being said, only using 50% of a language like C++ might be considered a feature and not a bug. ;)
- galangalalgol 4y agoMore anecdata my shop didn't allow exceptions in production code until very recently. I've written c++ with no exceptions for a quarter century. Now that I'm allowed to add them, I don't want to. I don't like the invisible control flow. I like how rust does it. Mostly my shop still ignores exceptions unless a dependency uses them. What half of the language am I missing?