[swift-evolution] [swift-evolution-announce] [Review] SE-0025 Scoped Access Level

Drew Crawford drew at sealedabstract.com
Sat Feb 27 08:26:13 CST 2016


I agree that property behaviors would be more compelling due to the specific way that I motivated the example, but if you instead imagine the analogous case for a function (that can only be called from specialQueue), we are back here again.

I actually believe we need–and I would prefer–"function behaviors" (!) as a solution to this problem, and property behaviors as a solution to my example.  I mentioned this in my review of the (rejected) SE-0030.

However, property behaviors was tabled/rejected, and "function behaviors" have not been proposed, as far as I know, except in a passing remark in my review.  So regarding solutions along that line, while you and I can agree they're superior, we seem to be in the minority.

This is one of those cases where in my view it is better go somewhere than stay here.  The community seems to have decided for the present not to go the "behavioral" direction, I would be in favor of reconsidering that decision, but unfortunately that question is not the one presently before us.  This proposal is not the best solution to my problems, but it is preferable to no solution.

Apple folk may want to check out rdar://21435592 <rdar://21435592> for a spookily similar feature request to this proposal that I logged way back in June 2015, and here I am saying most of the same things now that I said then.  So from my POV it is time to do something.  The additional time I've let this bake has caused me to reflect on this exact solution as being less excellent than I originally thought, but the problem itself still feels as fresh as it was 6 months ago.


> On Feb 27, 2016, at 7:52 AM, Stephen Celis <stephen.celis at gmail.com> wrote:
> 
>> On Feb 27, 2016, at 12:46 AM, Drew Crawford via swift-evolution <swift-evolution at swift.org> wrote:
>> 
>> What i mean here is simply [...]
> 
> Thanks Drew! This example is much more compelling than the one in the proposal, and I hope there are more that come to light in this thread. I do, however, think that property behaviors would be a better solution to that particular problem:
> 
> https://github.com/apple/swift-evolution/blob/master/proposals/0030-property-behavior-decls.md#synchronized-property-access
> 
> --
> Stephen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160227/6ad33cbd/attachment.html>


More information about the swift-evolution mailing list