News for hackers. Stuff that matters.
Re:The Cost of Exception Handling by pjc50 on Saturday November 12, 2022 @07:12AM (#33572348)
I mean .. yes, but easy multiple-value-return unpacking is also a fairly new feature. Back in the 90s you had one (1) lvalue. Making the "return (thing, error)" pattern miserable to use.
Re:The Cost of Exception Handling by masklinn on Saturday November 12, 2022 @07:40AM (#33572493)
I was going to say that such an alternative history C++ could have had MRVs earlier, or even sum types... but apparently exceptions were added a decade after constructors (if we draw that back to the original "C with classes").

So yeah, you're right that constructors led to exceptions, unless the designers of C++ had been willing to go back to the drawing board and entirely redo constructors.