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

Erica Sadun erica at ericasadun.com
Sat Dec 19 18:51:42 CST 2015


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 <mailto:swift-evolution at swift.org>> wrote:
> The discussion I was remembering, comment courtesy of Chris: 
> https://devforums.apple.com/message/1014317#1014317 <https://devforums.apple.com/message/1014317#1014317>
> 
> (linked from https://devforums.apple.com/thread/255242 <https://devforums.apple.com/thread/255242>)
> 
>  
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-evolution <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/a66ebb5f/attachment.html>


More information about the swift-evolution mailing list