> On Oct 5, 2015, at 8:19 PM, Rick Mann <rm...@latencyzero.com> wrote: > >> On Oct 5, 2015, at 18:12 , Jens Alfke <j...@mooseyard.com >> <mailto:j...@mooseyard.com>> wrote: >> >> NSURLComponents is a class, not a struct, so ‘url3’ is a reference, not a >> value, and ‘let’ just means you can’t reassign ‘url3’ to point to another >> object. > > But it wasn't allowed in the copy() case.
That’s because it doesn’t *know* it’s a class in the copy() case. An AnyObject could be a class *or* a struct. The compiler errs on the side of caution. Charles _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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 arch...@mail-archive.com