I don't blame them. It's a problem that will go away in a year or two at the latest, when everyone's switched over to generics-supporting compiler versions. Why put Apple engineering resources on this and commit them to maintaining this code officially when those of us who actually need this (and most of us will probably not build against two Xcode versions for long) can just copy-and-paste the 9 lines below.
Also, if it's added to Foundation now, what help is it to people? Newer Xcode versions already have generics support in the compiler, and older Xcode versions will be missing the version of the Foundation headers that contains these macros. > On 17 Jun 2015, at 15:26, David Hoerl <[email protected]> wrote: > > FYI: Apple just closed the rdar below with "There are no plans to address > this." > > On 6/10/15 3:35 PM, David Hoerl wrote: >> [I asked Jens for the rdar, he suggested I enter it myself, which I just >> did.] >> >> If you agree with the Jens/Uli approach, enter your own bug then suggest >> it be dupped to this one: >> >> rdar://21325577 Foundation Headers need Generics Macros for Objective C >> Collections >> >> #if __has_feature(objc_generics) >> #define NSArrayOf(VALUE) NSArray<VALUE> >> #define NSDictionaryOf(KEY, VALUE) NSDictionary<KEY, VALUE> >> #define NSSetOf(VALUE) NSSet<VALUE> >> #else >> #define NSArrayOf(VALUE) NSArray >> #define NSDictionaryOf(KEY, VALUE) NSDictionary >> #define NSSetOf(VALUE) NSSet >> #endif >> >> My reasoning in the bugreport is that Apple adding these will prevent >> the proliferation of conflicting approaches that will certainly ensue >> otherwise, making using and mixing open source code more difficult in >> the future for everyone. > _______________________________________________ Do not post admin requests to the list. They will be ignored. Objc-language mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/objc-language/archive%40mail-archive.com This email sent to [email protected]
