[swift-evolution] [swift-evolution-announce] [Review] SE-0103: Make non-escaping closures the default

Matthew Johnson matthew at anandabits.com
Wed Jun 22 18:38:25 CDT 2016


> 	* What is your evaluation of the proposal?

+11.  This is a much better default.  Escaping closures impose additional complexity on callers which should only be introduced when necessary.  

I am extremely unconvinced by the primary opposing argument that it should not be a breaking change to escape a closure that was not previously escaping.  This is a significant semantic change.  If an API author wants to reserve the right to escape a closure they should explicitly opt-in to that semantic from the start.

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

Yes.  Unfortunately many programmers are not careful about providing annotations that are not strictly required by the compiler.  This means that the compiler currently must treat many closures as escaping even though they will never actually escape.  This change makes the language safer and easier to use.

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

Very much so.

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

No.

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

I followed and participated in the discussion and gave the final proposal a quick read.  I have always thought this is the right default for the language and am glad to see that this proposal is receiving positive feedback.


More information about the swift-evolution mailing list