弃用的意思?

发布于 2024-12-15 06:13:07 字数 358 浏览 5 评论 0原文

当 jQuery、微软或其他一些软件公司说:“此功能已被弃用”时。

例如,当有一个 func1 在版本 1.0 中运行良好,但在版本 2.0 中已弃用,并且还引入了新的 func2 时:

  1. func1 是否也应该包含在版本 2.0 中以实现向后兼容性?
  2. func1 在 2.0 版本中应该可以正常工作吗? ( func2 对于版本 2 和 1 来说没问题)
  3. 是否允许 func2 在版本 2.0 中无法正常工作?

弃用的真正含义是什么?它在所有组织中的含义都相同吗?

对于前。 jQuery 中的 live 方法在 IE 1.7 中不起作用,但在 Chrome 中起作用)。

When jQuery, Microsoft or some other software company says:"this function is deprecated".

For example, when there is a func1 that works fine in version 1.0 and is deprecated in version 2.0 that also introduces a new func2:

  1. Should func1 also be included in version 2.0 for backwards compatibility?
  2. Is func1 supposed to work without bugs in version 2.0? ( func2 is fine with versions 2 and 1)
  3. Is func2 allowed not to work correctly in version 2.0?

What does deprecation really mean and does it mean the same in all organizations?

For ex. the live method in jQuery doesn't work in 1.7 in IE but it does in Chrome).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

饮湿 2024-12-22 06:13:07

我认为关于弃用的维基百科文章很好地回答了这个问题:

在编写计算机软件及其标准或文档的过程中,弃用是应用于软件功能的一种状态,表明应避免使用它们,通常是因为它们已被取代。尽管已弃用的功能仍保留在软件中,但它们的使用可能会引发建议替代做法的警告消息,并且弃用可能表明该功能将来将被删除。功能被弃用(而不是立即删除)是为了提供向后兼容性,并为使用该功能的程序员提供时间使其代码符合新标准。

I think the Wikipedia-article on Deprecation answers this one pretty well:

In the process of authoring computer software, its standards or documentation, deprecation is a status applied to software features to indicate that they should be avoided, typically because they have been superseded. Although deprecated features remain in the software, their use may raise warning messages recommending alternative practices, and deprecation may indicate that the feature will be removed in the future. Features are deprecated—rather than immediately removed—in order to provide backward compatibility, and give programmers who have used the feature time to bring their code into compliance with the new standard.

情释 2024-12-22 06:13:07

已弃用意味着他们不建议使用它,并且它没有进行进一步的开发。但它的工作方式不应该与以前的版本有所不同,除非文档明确说明这一点。

  1. 是的,否则它不会被称为“已弃用”

  2. 除非文档中另有说明,否则它应该与以前相同

    >

  3. 不,但如果 v1 中存在问题,他们不会修复它们

Deprecated means they don't recommend using it, and that it isn't undergoing further development. But it should not work differently than it did in a previous version unless documentation explicitly states that.

  1. Yes, otherwise it wouldn't be called "deprecated"

  2. Unless stated otherwise in docs, it should be the same as before

  3. No, but if there were problems in v1 they aren't about to fix them

风情万种。 2024-12-22 06:13:07

如果这些问题有真正的答案,那么每个软件供应商的答案都会有所不同,并且将由供应商定义。我不知道在这个问题上有任何真正的行业标准。

从历史上看,微软会将某些内容标记为已弃用,并声明将在未来版本中将其删除。不过,在他们真正摆脱它之前,可能会有几个版本。

If there are true answers to those questions, it would be different per software vendor and would be defined by the vendor. I don't know of any true industry standards that are followed with regards to this matter.

Historically with Microsoft, they'll mark something as deprecated and state they'll remove it in a future version. That can be several versions before they actually get rid of it though.

渡你暖光 2024-12-22 06:13:07

弃用通常意味着“不要使用它”。
已弃用的函数可能有效,也可能无效,但不保证一定有效。

Deprecated in general means "don't use it".
A deprecated function may or may not work, but it is not guaranteed to work.

唐婉 2024-12-22 06:13:07

当用于描述软件 API 时,对已弃用含义的最简单回答是:

  • 停止使用标记为已弃用的 API!
  • 它们将在未来的版本中消失!!
  • 尽快开始使用新版本!!!

The simplest answer to the meaning of deprecated when used to describe software APIs is:

  • Stop using APIs marked as deprecated!
  • They will go away in a future release!!
  • Start using the new versions ASAP!!!
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文