[swift-evolution] [Proposal] [Stage–2] `return` consistency for single-expressions

Chris Lattner clattner at nondot.org
Sat Feb 18 21:33:10 CST 2017

> On Feb 17, 2017, at 12:20 AM, Adrian Zubarev via swift-evolution <swift-evolution at swift.org> wrote:
> I’d like to revive an additive proposal that couldn’t make it into Swift 3. This proposal has a small improvement to the language compared to other big features currently being proposed. It almost feels like a bug fix rather than a new feature, but it still needs a full and quick review process.
> You can read the formatted version here: https://github.com/apple/swift-evolution/pull/608 <https://github.com/apple/swift-evolution/pull/608>
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.


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

More information about the swift-evolution mailing list