> On Dec 7, 2017, at 10:12 AM, Letanyan Arumugam via swift-evolution
> <firstname.lastname@example.org> wrote:
> My original argument about failing for no discernible reason still stands.
> precondition is a thought out check for a failing state. member lookup
> failures are going to be because things don’t exist for which you presumably
> expected to exist.
Is it necessarily true that things will have to fail "for no discernible
reason"? It's up to the implementers of the protocol for how they want to
handle the failure case (trap/return option/throw error/etc.). But I imagine it
could be possible to add a generic debug error message/warning message about
lookup failing for invocations of this kind, which would give a pretty clear
hint about what went wrong and why. Would that be enough to address your
concerns about silent failures?
swift-evolution mailing list