I’m designing an asynchronous API in the Swift 5.5 beta, starting with protocols. I’m trying to follow the rule that you should not impose irrelevant constraints, but I’m not sure whether I should require
Sendable for relevant associated types.
To be clear, my protocol doesn’t inherently do anything that would require
Sendable. I’m expecting a vast number of generic functions that would, however. These functions need the assurance that a result can’t change at any point in time.
Should I leave requiring
Sendable to callers, or anticipate the requirement?