[swift-evolution] [Review] SE-0047 Defaulting non-Void functions so they warn on unused results

Patrick Pijnappel patrickpijnappel at gmail.com
Wed Mar 16 18:22:04 CDT 2016

+1 but:

I'm somewhat hesistant about not marking the plausibly discarable ones
- I rarely use the result value of removeLast() and I don't see how
requiring it here adds any safety. It is obvious this call has side-effects
and doesn't just return the last element.
- I would say the canonical way to clean-up observers would be to call
removeObservers(self) in deinit to remove all of them at once. Though
arguably not marking it @discardable might have some small safety benefit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160317/9f5b7507/attachment.html>

More information about the swift-evolution mailing list