[swift-corelibs-dev] Proposal: Improve Import of Scanner APIs into Swift 3

2016-11-30 Thread Oliver Drobnik via swift-corelibs-dev
Earlier I posted this proposal to the Swift Evolution Mailing list. Then I looked at the NSScanner implementation in core libs and found experimental API using the return value to for returning the scanned results. See my comments on that below: — Working on a function for Foundation’s Scanne

Re: [swift-corelibs-dev] Proposal: Improve Import of Scanner APIs into Swift 3

2016-11-30 Thread Alfredo Delli Bovi via swift-corelibs-dev
Thanks Oliver for bringing this up. Anyone can share the thread for the draft/experimental API which is in the implementation? I cannot find it. About performance, I think the idea is to return Swift types only and not autoreleasing objects anymore. Still a performance test would be needed to c

Re: [swift-corelibs-dev] Autoupdating type properties

2016-11-30 Thread Pushkar N Kulkarni via swift-corelibs-dev
Thanks Tony, for the detailed explanation!  I think I need a bit more clarification though :)>>> Now, nothing in the value type contract says that you cannot have computed properties on a value type. Also, value types are not necessarily “pure”, in the sense that they ignore all external input. Wha

Re: [swift-corelibs-dev] Autoupdating type properties

2016-11-30 Thread Tony Parker via swift-corelibs-dev
Hi Pushkar, > On Nov 30, 2016, at 6:39 AM, Pushkar N Kulkarni wrote: > > Thanks Tony, for the detailed explanation! > > I think I need a bit more clarification though :) > > >>> Now, nothing in the value type contract says that you cannot have > >>> computed properties on a value type. Also

[swift-corelibs-dev] Fatal error Foundation/NSCalendar.swift, Ubuntu 16.04, Swift 3.0.1

2016-11-30 Thread Malcolm Barclay via swift-corelibs-dev
Hi, Is this a bug in the NSCalendar.swift? On Ubuntu 16.04 with Swift 3.0.1 installed this crashes. import Foundation let fromDate = Date() let toDate = Date(timeIntervalSinceNow: 20) let components = Calendar.current.dateComponents([.second], from: fromDate, to: toDate) Result: fatal error:

Re: [swift-corelibs-dev] Fatal error Foundation/NSCalendar.swift, Ubuntu 16.04, Swift 3.0.1

2016-11-30 Thread Tony Parker via swift-corelibs-dev
Hi Malcolm, Looks like it. If you go ahead and file a JIRA at bugs.swift.org , hopefully someone can take a look. Thanks, - Tony > On Nov 30, 2016, at 6:22 AM, Malcolm Barclay via swift-corelibs-dev > wrote: > > Hi, > > Is this a bug in the NSCalendar.swift? On Ubunt