> Was it ever? I thought that the idea of exceptions in C++ was always "no cost if not thrown".
Long, long ago enabling exceptions would add some overhead to all functions. When "zero cost exceptions" went mainstream it was a bit of a big deal, but a lot of people didn't read the memo and still argue about their cost.
Either way, I'm not a fan of exceptions in any language. I'd prefer an Either<Result, Error> return value any day.
Long, long ago enabling exceptions would add some overhead to all functions. When "zero cost exceptions" went mainstream it was a bit of a big deal, but a lot of people didn't read the memo and still argue about their cost.
Either way, I'm not a fan of exceptions in any language. I'd prefer an Either<Result, Error> return value any day.