Re: What is the best way to deprecate a protocol method?
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