Re: [swift-evolution] Pitch: Wrap calls to NSFileHandle and NSData in autorelease pools

2017-07-14 Thread Charles Srstka via swift-evolution
> On Jul 14, 2017, at 3:56 PM, John McCall wrote: > > >> On Jul 14, 2017, at 4:43 PM, Charles Srstka > > wrote: >> >>> On Jul 14, 2017, at 3:40 PM, John McCall >> >

Re: [swift-evolution] Pitch: Wrap calls to NSFileHandle and NSData in autorelease pools

2017-07-14 Thread John McCall via swift-evolution
> On Jul 14, 2017, at 4:43 PM, Charles Srstka wrote: > >> On Jul 14, 2017, at 3:40 PM, John McCall > > wrote: >> >> Would you mind just filing a bug with a reduced test case? >> >> John. > > Radar or bugs.swift.org

Re: [swift-evolution] Pitch: Wrap calls to NSFileHandle and NSData in autorelease pools

2017-07-14 Thread Philippe Hausler via swift-evolution
> On Jul 14, 2017, at 1:40 PM, John McCall via swift-evolution > wrote: > >> On Jul 14, 2017, at 4:31 PM, Charles Srstka > > wrote: >>> On Jul 14, 2017, at 3:24 PM, John McCall >>

Re: [swift-evolution] Pitch: Wrap calls to NSFileHandle and NSData in autorelease pools

2017-07-14 Thread Charles Srstka via swift-evolution
> On Jul 14, 2017, at 3:40 PM, John McCall wrote: > > Would you mind just filing a bug with a reduced test case? > > John. Radar or bugs.swift.org ? Charles ___ swift-evolution mailing list

Re: [swift-evolution] Pitch: Wrap calls to NSFileHandle and NSData in autorelease pools

2017-07-14 Thread Charles Srstka via swift-evolution
> On Jul 14, 2017, at 3:24 PM, John McCall wrote: > > We should absolutely not need to do the later autoreleases. We have logic to > autorelease objects when calling returns-inner-pointer objects on them, but > we shouldn't need to do that in safe patterns like what Data

Re: [swift-evolution] Pitch: Wrap calls to NSFileHandle and NSData in autorelease pools

2017-07-14 Thread John McCall via swift-evolution
> On Jul 14, 2017, at 4:15 PM, Charles Srstka wrote: > >> On Jul 14, 2017, at 2:35 PM, John McCall > > wrote: >> >>> On Jul 14, 2017, at 1:12 PM, Charles Srstka via swift-evolution >>>

Re: [swift-evolution] Pitch: Wrap calls to NSFileHandle and NSData in autorelease pools

2017-07-14 Thread John McCall via swift-evolution
> On Jul 14, 2017, at 4:31 PM, Charles Srstka wrote: >> On Jul 14, 2017, at 3:24 PM, John McCall > > wrote: >> >> We should absolutely not need to do the later autoreleases. We have logic >> to autorelease objects when

Re: [swift-evolution] Pitch: Wrap calls to NSFileHandle and NSData in autorelease pools

2017-07-14 Thread Charles Srstka via swift-evolution
> On Jul 14, 2017, at 2:35 PM, John McCall wrote: > >> On Jul 14, 2017, at 1:12 PM, Charles Srstka via swift-evolution >> > wrote: >> MOTIVATION: >> >> Meet Bob. Bob is a developer with mostly C++ and Java

Re: [swift-evolution] Pitch: Wrap calls to NSFileHandle and NSData in autorelease pools

2017-07-14 Thread John McCall via swift-evolution
> On Jul 14, 2017, at 1:12 PM, Charles Srstka via swift-evolution > wrote: > MOTIVATION: > > Meet Bob. Bob is a developer with mostly C++ and Java experience, but who has > been learning Swift. Bob needs to write an app to parse some proprietary > binary data format

[swift-evolution] Pitch: Wrap calls to NSFileHandle and NSData in autorelease pools

2017-07-14 Thread Charles Srstka via swift-evolution
MOTIVATION: Meet Bob. Bob is a developer with mostly C++ and Java experience, but who has been learning Swift. Bob needs to write an app to parse some proprietary binary data format that his company requires. Bob’s written this app, and it’s worked pretty well on Linux: import Foundation do