[Pitch N+1] Typed Throws

I’ve been thinking about this also. If we’re going to rethink rethrows I think it should happen in the context of an effect system that allows us to abstract over effects. My hunch is that this would probably end up looking more like Doug’s reinterpretation of rethrows in terms of throws than the existing behavior of rethrows and consistent semantics across effects is probably more important than the subtle difference with current behavior.

This is obviously a separate topic, but one I would love to see receive some attention. If we had a vision of what a general effect system might look like in Swift it could provide helpful context to this decision. Perhaps it would be useful to continue this discussion in the existing effects thread?

2 Likes