[swift-evolution] [swift-evolution-announce] [Review] SE-0035 Limiting inout capture to @noescape contexts

Kevin Ballard kevin at sb.org
Thu Feb 18 16:09:20 CST 2016

On Tue, Feb 16, 2016, at 05:30 PM, Chris Lattner wrote:
> 	* What is your evaluation of the proposal?

+1. Seems like a good idea. Shadow copies of inout parameters are confusing.

> 	* Is the problem being addressed significant enough to warrant a change to Swift?

Yes, it's a surprising edge case that can be hard to understand if you don't know what's going on.

> 	* Does this proposal fit well with the feel and direction of Swift?

I think it's fairly neutral.

> 	* If you have you used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

The only language that comes to mind that might have a similar situation is C++ with pass-by-ref parameters and C++11 lambdas, and I'm not quite sure how those interact. I assume that if you capture the parameter by-ref in the lambda, it'll capture the original reference, but in that case it would not be safe to have the lambda out-live the reference (i.e. there'd be no shadow copy made). But I've not actually researched this topic.

> 	* How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

A quick reading.

-Kevin Ballard

More information about the swift-evolution mailing list