Re: [swift-corelibs-dev] KVC dependent classes

2016-03-19 Thread Brent Royal-Gordon via swift-corelibs-dev
> Sorry, I said NSProgress but I meant NSPredicate. I personally can't even > imagine what a alternative API for NSPredicate would look like 🤔 Use reflection. Match against only dictionaries with string keys. Match against only objects conforming to some dictionary-with-string-keys-like protoc

Re: [swift-corelibs-dev] NSHTTPURLResponse.localizedStringForStatusCode()

2016-03-19 Thread Daniel Eggert via swift-corelibs-dev
What code will be used to make then _localized_? /Daniel > On 17 Mar 2016, at 19:15, Ian Partridge via swift-corelibs-dev > wrote: > > Hi Philippe, thanks for your quick reply. > > The HTTP status code reason phrases are designed to be human readable. > They are standard phrases that are easi

Re: [swift-corelibs-dev] non-inherited init

2016-03-19 Thread Pushkar N Kulkarni via swift-corelibs-dev
Sorry for intruding!I have the same question about /*@NSCopying*/  Pushkar N Kulkarni, IBM RuntimesSimplicity is prerequisite for reliability - Edsger W. Dijkstra -swift-corelibs-dev-boun...@swift.org wrote: -To: Daniel Eggert From: Philippe Hausler via swift-corelibs-d

[swift-corelibs-dev] NSURLRequest — missing attributes

2016-03-19 Thread Daniel Eggert via swift-corelibs-dev
I created https://github.com/apple/swift-corelibs-foundation/pull/290 to add 4 attributes that were missing compared to Darwin Foundation. I also re-worked how attributes are used / stored for the immutable / mutable version. I didn't add any documentation to the 4 attributes, because I didn't k

Re: [swift-corelibs-dev] non-inherited init

2016-03-19 Thread Philippe Hausler via swift-corelibs-dev
That is a comment emitted by the importer, unfortunately it is impossible for non objc to mimic that behavior 100% because it is an init method that is constructed from a class method. @interface Foo : NSObject + (Foo *)fooNamed:(NSString *)name; // this is not an inherited init method in that

[swift-corelibs-dev] non-inherited init

2016-03-19 Thread Daniel Eggert via swift-corelibs-dev
There're some initializers (namely in NSURLSession) that have a comment: public /*not inherited*/ init(... What is this “not inherited” comment trying to convey, and how would one go about implementing this in Swift? /Daniel ___ swift-corelibs-dev ma

Re: [swift-corelibs-dev] NSURLSession & libcurl

2016-03-19 Thread Tony Parker via swift-corelibs-dev
Awesome, thanks for taking this on! - Tony > On Mar 17, 2016, at 12:33 PM, Daniel Eggert via swift-corelibs-dev > wrote: > > I’ve made good progress on this. I’ll try to get something that’s merge-able > within the next week. It won’t be 100% complete by any means, but should > hopefully (A)

[swift-corelibs-dev] NSHTTPURLResponse.localizedStringForStatusCode()

2016-03-19 Thread Ian Partridge via swift-corelibs-dev
Hi, A quick question about implementing this method. Do we want the strings returned to match those returned by the Objective-C implementation of Foundation, or follow RFC 2616? Currently they are inconsistent, e.g. Obj-C Foundation returns "no error" for status code 200, whereas the RFC says thi

[swift-corelibs-dev] A question about @NSCopying

2016-03-19 Thread Pushkar N Kulkarni via swift-corelibs-dev
I am trying to implement some of the methods and properties in NSOrderedSet. The read-only property "reversedOrderedSet" has the @NSCopying attribute according to the NSOrderedSet class reference. So, I tried to do this: @NSCopying public var reversedOrderedSet: NSOrderedSet {    return NSOrderedSe

Re: [swift-corelibs-dev] NSURLRequest — missing attributes

2016-03-19 Thread Philippe Hausler via swift-corelibs-dev
I personally find inline documentation helpful as a reminder of the goal of the desired behavior. Sent from my iPhone > On Mar 16, 2016, at 7:47 AM, Daniel Eggert via swift-corelibs-dev > wrote: > > I created https://github.com/apple/swift-corelibs-foundation/pull/290 > to add 4 attributes t

Re: [swift-corelibs-dev] NSHTTPURLResponse.localizedStringForStatusCode()

2016-03-19 Thread Ian Partridge via swift-corelibs-dev
Hi Philippe, thanks for your quick reply. The HTTP status code reason phrases are designed to be human readable. They are standard phrases that are easily searched for online. The latest table is at http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml - isn't there a case for

Re: [swift-corelibs-dev] NSHTTPURLResponse.localizedStringForStatusCode()

2016-03-19 Thread Quinn "The Eskimo!" via swift-corelibs-dev
On 17 Mar 2016, at 19:52, Ian Partridge via swift-corelibs-dev wrote: > I wondered if Obj-C foundation translated them based > on the current locale, but it doesn't. It should translate them based on the current language (not locale). The fact that it doesn't is a bug. This seems to be yet