[swift-evolution] Make non-void functions @warn_unused_result by default
Dave Abrahams
dabrahams at apple.com
Fri Dec 18 14:25:56 CST 2015
> On Dec 18, 2015, at 3:47 AM, Tino Heth via swift-evolution <swift-evolution at swift.org> wrote:
>
>
>> _ = pop()
>
> Now that's what I'd call ugly - I vote against everything that forces me to use more underscores ;-)
“pop()” is an example of the comparatively-rare method that one might want to annotate to avoid the warning: the side-effect is useful even if you’re dropping the result. We’re only talking about making warn_unused_result the default, not making it the only option.
-Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151218/193f31b1/attachment.html>
More information about the swift-evolution
mailing list