Re: [swift-evolution] [pitch] Atomics

2017-02-24 Thread Anton Mironov via swift-evolution
+1 But I would also suggest using Int instead of Int64 in public interface. > On Feb 23, 2017, at 23:44, Guillaume Lessard via swift-evolution > wrote: > > There is no clean way to use atomic operations in Swift at the moment, even > less so after most of

Re: [swift-evolution] [Proposal] Guarded self in closures

2017-02-24 Thread Anton Mironov via swift-evolution
> On Feb 23, 2017, at 3:55 PM, Matthew Johnson wrote: > >> >> On Feb 23, 2017, at 4:40 AM, Anton Mironov > > wrote: >> >> >>> On Feb 23, 2017, at 4:28 AM, Matthew Johnson >>

Re: [swift-evolution] [Proposal] Guarded self in closures

2017-02-23 Thread Anton Mironov via swift-evolution
> On Feb 23, 2017, at 4:28 AM, Matthew Johnson wrote: > >> >> On Feb 22, 2017, at 7:13 PM, Anton Mironov > > wrote: >> >>> >>> On Feb 23, 2017, at 02:19, Matthew Johnson >>

Re: [swift-evolution] [Proposal] Guarded self in closures

2017-02-22 Thread Anton Mironov via swift-evolution
> On Feb 23, 2017, at 02:19, Matthew Johnson wrote: > >> >> On Feb 22, 2017, at 6:06 PM, Anton Mironov > > wrote: >> >> >>> On Feb 23, 2017, at 01:18, Matthew Johnson >>

Re: [swift-evolution] [Proposal] Guarded self in closures

2017-02-22 Thread Anton Mironov via swift-evolution
> On Feb 23, 2017, at 01:18, Matthew Johnson wrote: > >> >> On Feb 22, 2017, at 5:06 PM, Anton Mironov > > wrote: >> >> -1 >> I support improvements in this area but I do not think that adding guarded >>

Re: [swift-evolution] [Proposal] Guarded self in closures

2017-02-22 Thread Anton Mironov via swift-evolution
-1 I support improvements in this area but I do not think that adding guarded closures will fix the case. It raises multiple concerns: - prepending ? to the closure declaration is as forgettable as `[weak self]` - reactive programming often assumes chaining of operations. How guarded closures

Re: [swift-evolution] A compiler option to warn if a closure captures a strong reference to a class instance?

2017-02-20 Thread Anton Mironov via swift-evolution
Hi. I’ve come to this issue too. I thought that current Swift memory model is good enough to solve this in the other way. I've put self (aka ExecutionContext) as an argument to map/filter/etc. This looked like I'm binding execution to the specified context. It might sound odd, but it actually

Re: [swift-evolution] protocol-oriented integers (take 2)

2017-01-25 Thread Anton Mironov via swift-evolution
n Jan 25, 2017, at 07:59, Anton Mironov via swift-evolution >> <swift-evolution@swift.org> wrote: >> >> Hi everyone, >> >> I want to suggest a tiny extension to an Arithmetic protocol. It would be >> nice to have an additive identity a