[swift-evolution] [Review] SE-0047 Defaulting non-Void functions so they warn on unused results
patrickpijnappel at gmail.com
Wed Mar 16 18:22:04 CDT 2016
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...
More information about the swift-evolution