What does “This method is deprecated” mean for application developers

后端 未结 5 1391
[愿得一人]
[愿得一人] 2020-12-01 11:59

I see quite a few good old useful methods or even entire classes being \"deprecated and obsolete\".

But code that used to call those methods continues to work. So,

5条回答
  •  心在旅途
    2020-12-01 12:38

    Deprecated methods are not guaranteed to remain backwards compatible. They might remain in there for a few more releases just to give everyone a chance to migrate away from them before the developers remove them. The fact that they're deprecated means that the developers think that there's an easier, faster, neater, or otherwise better way to do whatever that class or method does.

    It's probably better to change your code to use a non-deprecated interface now, since if you wait and it does get removed, your users will see crashes and errors.

提交回复
热议问题