[swift-evolution] [swift-evolution-announce] [Review] SE-0047 Defaulting non-Void functions so they warn on unused results
2th at gmx.de
Thu Mar 17 04:27:40 CDT 2016
> 1. The keyword will be used rarely. I don't mind if it's slightly hard to type.
The first sentence might be true for many developers, but you can't predict how other people will design their libraries:
Have a look at http://www.martinfowler.com/bliki/FluentInterface.html for a good reason to keep "results" discardable.
Sadly, the second sentence is definitely true — "@discardableResult" doesn't "feel" right, and would discourage techniques like fluent interfaces.
More information about the swift-evolution