> Not necessarily: Indeed - he talks about typed exceptions, ie where static type analysis remains applicable - this is not the case for Nim and thus we have to pay the price. We can claw some of it back, but in many places we have to make conservative guesses which affect the happy path - on the unhappy path we also have to make a dynamic allocation with subsequent dynamic type discovery - this all adds up.
Yes, returning Result everywhere has an associated cost too - goto-exceptions are nice in that way in that the bool is "mostly" optimizable, but is Result if you exploit knowledge about it (ie make the same assumption about hot/cold as goto-exceptions make) - implementation-wise they're very similar except for the dynamic typing aspect - a Result is after all a bool + a value, but its type is statically known so the compiler / optimizer has more information to work with - with that simple point in hand, it's easy to understand (information-theoretically, if you will) that it will be the same or better than goto-exceptions in all cases, for perfectly generated code.
