> On Feb 25, 2016, at 2:08 PM, Quincey Morris 
> <quinceymor...@rivergatesoftware.com> wrote:
> 
> However, it looks like you can use the simpler form:
> 
>       hostArray addObject: (NSString*)url.host]; // apparently converts it 
> back to “nullability unspecified"

Hm, that’s simpler, but it’s kind of dangerous since you could get the type 
wrong. For instance:

        [portString appendString: (NSString*)url.port];    // ouch!

>       NSString* host = url.host;
>       if (host)
>               [hostArray addObject: host];

Yeah, that’s safe. I might still try to come up with an IF_LET() macro, though…

—Jens
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (Xcode-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to