[swift-dev] Questions about ARC

2016-11-30 Thread Jiho Choi via swift-dev
Hi, I am new to Swift, and I have several questions about how ARC works in Swift. 1. I read from one of the previous discussions in the swift-evolution list ( https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160208/009422.html) that ARC operations are currently not atomic as Swift

Re: [swift-dev] [RFC] Modify the build system to enable/disable ObjC interop for any platform

2016-11-30 Thread Jordan Rose via swift-dev
> On Nov 29, 2016, at 12:36, Joe Groff via swift-dev > wrote: > > >> On Nov 29, 2016, at 12:24 PM, Brian Gesiak wrote: >> >> Thanks all! It's great to hear that this wouldn't be completely unwelcome -- >> especially Swift Darwin with Objective-C interop disabled. > > To be clear, I didn't

Re: [swift-dev] Questions about ARC

2016-11-30 Thread John McCall via swift-dev
> On Nov 30, 2016, at 8:33 AM, Jiho Choi via swift-dev > wrote: > Hi, > > I am new to Swift, and I have several questions about how ARC works in Swift. > > 1. I read from one of the previous discussions in the swift-evolution list > (https://lists.swift.org/pipermail/swift-evolution/Week-of-Mo

Re: [swift-dev] Questions about ARC

2016-11-30 Thread David P Grove via swift-dev
> From: John McCall via swift-dev > To: Jiho Choi > Cc: swift-dev@swift.org > Date: 11/30/2016 12:41 PM > Subject: Re: [swift-dev] Questions about ARC > Sent by: swift-dev-boun...@swift.org > > On Nov 30, 2016, at 8:33 AM, Jiho Choi via swift-dev > wrote: > > > > > 4. Lastly, is there a way to

Re: [swift-dev] Questions about ARC

2016-11-30 Thread Alexis via swift-dev
> On Nov 30, 2016, at 12:41 PM, John McCall via swift-dev > wrote: > > When we say that we don't have a concurrency model, we mean that (1) we > aren't providing a more complete language solution than the options available > to C programmers and (2) like C pre-C11/C++11, we have not yet forma

Re: [swift-dev] Questions about ARC

2016-11-30 Thread John McCall via swift-dev
> On Nov 30, 2016, at 11:58 AM, Alexis wrote: >> On Nov 30, 2016, at 12:41 PM, John McCall via swift-dev > > wrote: >> >> When we say that we don't have a concurrency model, we mean that (1) we >> aren't providing a more complete language solution than the options >>

Re: [swift-dev] High-level SIL Optimization: How do I get a FuncRef from the stdlib?

2016-11-30 Thread Slava Pestov via swift-dev
What is the generic signature of the method you’re generating the call to? if it’s always something like func foo(a: Array) ie, single generic parameter, without any constraints, then you can manually create a single-element substitution list with no conformances. Slava > On Nov 29, 2016, at

Re: [swift-dev] [Pitch] Remove "Default will never be executed" Warning?

2016-11-30 Thread Jordan Rose via swift-dev
> On Nov 27, 2016, at 16:32, David Sweeris via swift-dev > wrote: > >> >> On Nov 26, 2016, at 5:25 PM, Robert Widmann via swift-dev >> mailto:swift-dev@swift.org>> wrote: >> >> Hello all, >> >> I’ve seen and been a part of a number of conversations recently where talk >> of planning for “r

Re: [swift-dev] Questions about ARC

2016-11-30 Thread Jiho Choi via swift-dev
Thanks for clarifications. I have a couple of follow-up questions. 1. Could you please provide more information (e.g. source code location) about the optimization applying non-atomic reference counting? What's the scope of the optimization? Is it method-based? 2. Looking at the source code, I

Re: [swift-dev] Questions about ARC

2016-11-30 Thread Roman Levenstein via swift-dev
> On Nov 30, 2016, at 6:25 PM, Jiho Choi via swift-dev > wrote: > > Thanks for clarifications. I have a couple of follow-up questions. > > 1. Could you please provide more information (e.g. source code location) > about the optimization applying non-atomic reference counting? What's the >

Re: [swift-dev] Questions about ARC

2016-11-30 Thread Michael Gottesman via swift-dev
> On Nov 30, 2016, at 6:25 PM, Jiho Choi via swift-dev > wrote: > > Thanks for clarifications. I have a couple of follow-up questions. > > 1. Could you please provide more information (e.g. source code location) > about the optimization applying non-atomic referenc

Re: [swift-dev] Questions about ARC

2016-11-30 Thread Jiho Choi via swift-dev
Thanks for providing the pointer. Do you have any preliminary result or goal (e.g. the replacement ratio) of the optimization? Is it going to replace all ARC operations with non-atomic ones for single-threaded applications? On Wed, Nov 30, 2016 at 8:50 PM Roman Levenstein wrote: > On Nov 30, 20