3 ms·
Yes, with enough syntactic sugar it can become equivalent. Exceptions can be viewed as sum types with special syntactic sugar in conjunction with the regular re
by layer8 2y ago
Yes, with enough syntactic sugar it can become equivalent. Exceptions can be viewed as sum types with special syntactic sugar in conjunction with the regular return types, and can in principle be implemented as such.
When I say "exceptions", I mean the source-level semantics, not how it's implemented behind the scenes.