> On Jul 7, 2015, at 17:30 , Roland King <[email protected]> wrote:
> 
> 1) If you’re sure it’s not nil, which for that particular case of an 
> enumerator from a filemanager I’d agree it’s not (can’t make one work in a 
> playground to test) then just force-unwrap it
> 2) As concise as ‘for case let url as NSURL in eumerator’ is, I think the 
> original code was somewhat clearer for the next guy maintaining it

I couldn't figure out how to force-unwrap it in the for statement. If I can't 
do it there, I have to introduce another variable, which is just smelly. E.g.:

    for item in enumerator!
    {
        let unwrappedItem = item as! NSURL
    }

(or something like that)

-- 
Rick Mann
[email protected]



_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to