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

Adrian Zubarev adrian.zubarev at devandartist.com
Tue May 31 13:49:29 CDT 2016


I really like the proposal in case of properties and functions, but I 
really don't want to have 
guard boolean else { "false" } 

I feel like `return` is very important part of `guard` statement. 
I understand the requirement for consistency with 
properties/closures/functions, but I'll prefer to have some inconsistency 
in language in this case and require `return` for `guard`. And in case I'll 
have to choose all-or-nothig, I'll give -1 for the proposal. 

I.e. IMO current `return` in properties and functions is less evil than 
absent of `return` in `guard`.
I could note in alternative section that `guard` might be left out from this consistency.



-- 
Adrian Zubarev
Sent with Airmail

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


More information about the swift-evolution mailing list