[swift-evolution] [Proposal] =?utf-8?Q?=5BStage=E2=80=932=5D_?=`return` consistency for single-expressions

Adrian Zubarev adrian.zubarev at devandartist.com
Sun Feb 19 01:49:26 CST 2017

I was a little afraid of that when I read Teds message first, but I thought I give it a try. This additional change doest feel heavy at all to me.

My question is, when is the right time for this if not now? If not now than this won’t happen in Swift 4.1 either, and I highly doubt it for Swift 5, because then we’re probably going to focus on ABI again to get it finally done.

If that change could be accepted, than just leave it until someone had some time to implement it. That means if no one had time for Swift 4, then it might happen in Swift 4.1. The point is that it will potentially happen at some point, because it would be already accepted.

Furthermore I think such _smaller_ proposals are more attractive to people who wants to jump in and contribute to Swift, but might not want to start with heavy features like ‘Conditional conformances’.

I really would like the core team to consider this proposal for a review. :)

Adrian Zubarev
Sent with Airmail

Am 19. Februar 2017 um 04:33:13, Chris Lattner (clattner at nondot.org) schrieb:

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

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/20170219/27bf1fda/attachment.html>

More information about the swift-evolution mailing list