• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Private Methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Private Methods (From: Richard Charles <email@hidden>)
 >Re: Private Methods (From: Sean McBride <email@hidden>)
 >Re: Private Methods (From: Richard Charles <email@hidden>)
 >Re: Private Methods (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Xcode warning from linking to a third-party framework in both app and in framework included in app?
  • Next by Date: Re: Private Methods
  • Previous by thread: Re: Private Methods
  • Next by thread: Re: Private Methods
  • Index(es):
    • Date
    • Thread