If/guard-let-catch for conveniently accessing both Result type cases

How is anyone supposed to know better than a specific projects developers if having a closed set of errors is a bad idea for their specific use case or not? This is the part I'm struggling with. I get that Swift is opinionated on some things to ensure its documented goals of being safe, fast and expressive are met. I just don't see how typed errors or the less invasive proposal I make here go against any of their goals, quite the opposite.

And I still disagree that my proposal would create 2 worlds of error handling in Swift. To "use the language as intended" you can simply call .get() on the Result type. And @Jon_Shier addressed the concerns for a possible future implementation of typed throws in the related thread pretty well:

2 Likes