[swift-evolution] [Proposal] function "return" optional keyword.

Jacob Bandes-Storch jtbandes at gmail.com
Sat Dec 19 20:31:31 CST 2015


In this scenario, should calling a warn_unused_result function as the last
statement in a closure/function count as "using" its result (i.e.
implicitly returning it)?

Jacob

On Sat, Dec 19, 2015 at 4:51 PM, Erica Sadun via swift-evolution <
swift-evolution at swift.org> wrote:

> Is there a reason that any final non-void statement in a closure or
> function shouldn't automagically be an optional return? (And automagically
> warn_unused_result...?)
>
> On Dec 19, 2015, at 5:44 PM, Andrew Bennett via swift-evolution <
> swift-evolution at swift.org> wrote:
>
> +1 for consistency with closures
>
> On Sun, Dec 20, 2015 at 8:15 AM, Stephen Christopher via swift-evolution <
> swift-evolution at swift.org> wrote:
>
>> The discussion I was remembering, comment courtesy of Chris:
>> https://devforums.apple.com/message/1014317#1014317
>>
>> (linked from https://devforums.apple.com/thread/255242)
>>
>>
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>>
>>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151219/0925466e/attachment.html>


More information about the swift-evolution mailing list