[swift-evolution] Property Getter Return Statement

Nevin Brackett-Rozinsky nevin.brackettrozinsky at gmail.com
Sat Oct 7 11:59:51 CDT 2017

On Sat, Oct 7, 2017 at 11:24 AM, Xiaodi Wu <xiaodi.wu at gmail.com> wrote:

> This has been brought up on the list before. For instance:
> https://github.com/apple/swift-evolution/pull/608
> Chris Lattner’s response at that time was:
> ‘Just MHO, but I consider this syntactic sugar, not a fundamental feature
> that fits the goal of Swift 4 stage 2.
> ‘I’m also pretty opposed to doing it at any time. The rationale of
> “implicit return” in closures is specifically because they are limited to a
> single expression, which makes the semantics “obvious”. This was carefully
> considered.’

This objection is not applicable, because we are discussing the possibility
to omit “return” exactly when there is a single expression in the getter.

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

More information about the swift-evolution mailing list