Re: Private Methods
Re: Private Methods
- Subject: Re: Private Methods
- From: Quincey Morris <email@hidden>
- Date: Tue, 18 Aug 2015 17:59:04 +0000
On Aug 18, 2015, at 10:20 , Jens Alfke <email@hidden> wrote:
>
> But would Swift have caught this issue, since the CALayer.context property isn’t visible in headers at all, only in the compiled code?
I don’t actually know (it’s a bit awkward to test), but my belief is that Swift does not have this defect. Conflicts within a module would be caught at link time, and conflicts across a module boundary can’t happen because of namespacing — by definition, your apparently-conflicting method name is in a different module.
However, it’s not obvious to me whether this works when the “base” module is an Obj-C framework such as Cocoa frameworks. In that case, it seems possible that the Obj-C mechanics of dynamic overrides might force Swift to use the older unsafe mechanism.
I don’t know that I’ve seen this discussed in the forums, but it would be nice to know the answer.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden