Re: [swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-15 Thread David Sweeris via swift-evolution
> On May 12, 2017, at 19:29, Ben Cohen via swift-evolution > wrote: > > Hello Swift community, > > The review of revisions to SE-0176: Enforce Exclusive Access to Memory begins > now and runs through May 17, 2017. > > Most of this proposal was previously accepted.

Re: [swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-13 Thread Christopher Kornher via swift-evolution
https://github.com/apple/swift-evolution/blob/master/proposals/0176-enforce-exclusive-access-to-memory.md What is your evaluation of the proposal? +1 It seems to be a carefully considered

[swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-12 Thread Ben Cohen via swift-evolution
Hello Swift community, The review of revisions to SE-0176: Enforce Exclusive Access to Memory begins now and runs through May 17, 2017. Most of this proposal was previously accepted. An implementation issue has been discovered with the use of dynamic enforcement on inout parameters. The

Re: [swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-08 Thread T.J. Usiyan via swift-evolution
- What is your evaluation of the proposal? +1 - Is the problem being addressed significant enough to warrant a change to Swift?Yes - Does this proposal fit well with the feel and direction of Swift?I think so. - If you have used other languages or libraries with a similar feature, how do you feel

Re: [swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-08 Thread John McCall via swift-evolution
> On May 7, 2017, at 10:41 AM, Paul Cantrell wrote: > > >> On May 7, 2017, at 6:01 AM, Jean-Daniel > > wrote: >> >>> >>> Le 7 mai 2017 à 03:54, Paul Cantrell via swift-evolution >>>

Re: [swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-08 Thread Nevin Brackett-Rozinsky via swift-evolution
On Sun, May 7, 2017 at 2:04 PM, Xiaodi Wu via swift-evolution < swift-evolution@swift.org> wrote: > Actually, `swapAt` does have a precondition that the elements differ. Looking at the source code , the

Re: [swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-07 Thread Xiaodi Wu via swift-evolution
Actually, `swapAt` does have a precondition that the elements differ. On Sun, May 7, 2017 at 09:41 Paul Cantrell via swift-evolution < swift-evolution@swift.org> wrote: > > On May 7, 2017, at 6:01 AM, Jean-Daniel wrote: > > > Le 7 mai 2017 à 03:54, Paul Cantrell via

Re: [swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-07 Thread Paul Cantrell via swift-evolution
> On May 7, 2017, at 6:01 AM, Jean-Daniel wrote: > >> >> Le 7 mai 2017 à 03:54, Paul Cantrell via swift-evolution >> > a écrit : >> >> >>> On May 6, 2017, at 12:36 PM, John McCall via swift-evolution >>>

Re: [swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-07 Thread Jean-Daniel via swift-evolution
> Le 7 mai 2017 à 03:54, Paul Cantrell via swift-evolution > a écrit : > > >> On May 6, 2017, at 12:36 PM, John McCall via swift-evolution >> > wrote: >> >> >>> On May 6, 2017, at 1:11 PM, Félix

Re: [swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-06 Thread Paul Cantrell via swift-evolution
> On May 6, 2017, at 12:36 PM, John McCall via swift-evolution > > wrote: > > >> On May 6, 2017, at 1:11 PM, Félix Cloutier via swift-evolution >> > wrote: >> >> Concern:

Re: [swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-06 Thread Félix Cloutier via swift-evolution
I guess that the example doesn't make a lot of sense outside of collections, and the proposal already says that swap needs to be implemented on collections, but consider the Fisher-Yates shuffle: -- To shuffle an array a of n elements (indices 0..n-1): for i from n−1 downto 1 do j ← random

Re: [swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-06 Thread John McCall via swift-evolution
> On May 6, 2017, at 1:11 PM, Félix Cloutier via swift-evolution > wrote: > > I have one concern and one general comment. > > General comment: there's a switch to turn off overflow checks for performance > reasons. It seems to me that this check is going to be much

Re: [swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-06 Thread Félix Cloutier via swift-evolution
I have one concern and one general comment. General comment: there's a switch to turn off overflow checks for performance reasons. It seems to me that this check is going to be much more expensive than an overflow check, and it's certainly not much more likely to trigger in a release build

Re: [swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-04 Thread Xiaodi Wu via swift-evolution
The proposal looks good in general. Like some others, my chief concerns are around dynamic enforcement. If it's not certain to be cheap enough to be enabled without per-member opt-out and possibly build settings to turn it off, perhaps the way to go is to add static enforcement now and prototype

Re: [swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-04 Thread Michel Fortin via swift-evolution
> https://github.com/apple/swift-evolution/blob/master/proposals/0176-enforce-exclusive-access-to-memory.md > What is your evaluation of the proposal? It's a bit hard to evaluate without experience. But I would summarize the benefits like this: 1. Clearer semantics inside functions. Variables

Re: [swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-02 Thread John McCall via swift-evolution
> On May 2, 2017, at 6:44 PM, Jon Shier via swift-evolution > wrote: > I’m not a language or memory expert, so I think the proposal could use > a few more examples of the code it would disallow. Perhaps examples from real > world projects? Without being an

Re: [swift-evolution] [Review] SE-0176: Enforce Exclusive Access to Memory

2017-05-02 Thread Jon Shier via swift-evolution
I’m not a language or memory expert, so I think the proposal could use a few more examples of the code it would disallow. Perhaps examples from real world projects? Without being an expert I’m having a hard time seeing the full impact of the proposed rules. Also, the