[swift-evolution] [Pitch] Make `return` optional in computed properties for a single case

Adrian Zubarev adrian.zubarev at devandartist.com
Tue May 31 14:36:46 CDT 2016

Exactly.  You are allowed to omit `return` if the entire body only consists of `return some().expression`
Thats where the useless example comes in (but we don’t need this behavior at all):

func foo(boolean: Bool) {

    guard boolean else {}



I made some changes to the proposal: https://github.com/DevAndArtist/swift-evolution/blob/single_expression_optional_return/proposals/nnnn-single-expression-optional-return.md

Please review it again. :)
Adrian Zubarev
Sent with Airmail

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160531/2aabdb80/attachment.html>

More information about the swift-evolution mailing list