• 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: What is the best way to deprecate a protocol method?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the best way to deprecate a protocol method?


  • Subject: Re: What is the best way to deprecate a protocol method?
  • From: Bernie Maier <email@hidden>
  • Date: Fri, 24 Mar 2017 19:12:51 +1100

> On Mar 23, 2017, at 2:08 PM, Jim Adams <email@hidden> wrote:
>
> Heck we have to check which one to call do that anyway but we want a
> compiler warning and not a compiler error.

I think you’re SOL then. The compiler doesn’t seem to support
deprecation warnings on _implementing_ a method, only _calling_ it.

It's interesting this has come up just now, because just earlier this week I attempted to do this very same thing: deprecate a protocol method and provide a compiler warning to code implementing that protocol method. Worse still, it was an optional method.

When I thought about it, however, I realised it's kind of a difficult task for the compiler, because it has no way of distinguishing an implementation of a (deprecated) protocol method from just a plain method in the "client" class that happens to have the same signature.


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >What is the best way to deprecate a protocol method? (From: Jim Adams <email@hidden>)
 >Re: What is the best way to deprecate a protocol method? (From: Jens Alfke <email@hidden>)
 >Re: What is the best way to deprecate a protocol method? (From: Jim Adams <email@hidden>)
 >Re: What is the best way to deprecate a protocol method? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: How do I adjust a NSSplitView(Controller) pane proportions in Interface Builder?
  • Next by Date: Un-embed UITableView from UIViewController content view in Interface Builder
  • Previous by thread: Re: What is the best way to deprecate a protocol method?
  • Next by thread: Linker warning "linking module flags 'Dwarf Version': IDs have conflicting values" ?
  • Index(es):
    • Date
    • Thread