当新功能作为语言核心的一部分出现时,现有的库会消失吗?

发布于 2024-10-03 03:47:39 字数 192 浏览 1 评论 0原文

** 请大家注意,这个问题并不是要引发任何口水战。 **

我试图了解当语言中以前不存在的相同功能现在作为语言的一部分出现时,实现某些功能的现有库会发生什么?例如,C++ 很快就会将 std::thread 作为语言标准的一部分,那么 POSIX 或 Boost 库会发生什么情况呢?

我也很想了解其他编程语言的用户在这方面可能有什么经验。

** Please people, this question is not meant to begin any flame war. **

I am trying to understand what happens to existing libraries implementing some functionality when the same functionality that was not previously there in the language now comes in as part of the language? For e.g. C++ would soon have std::thread as part of the language standard so what happens to the POSIX or Boost Libraries?

I would also be keen to understand what experiences users of other programming languages might have in this regard.

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

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

发布评论

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

评论(4

2024-10-10 03:47:39

新技术的采用绝不会一蹴而就。编译器实现新的标准库版本时会出现一个延迟,然后当这些编译器到达开发人员手中时会出现另一个延迟。

我的前两份工作偶尔会与 Visual C++ 6 进行交互,该工具已经有 10 多年的历史了。人们非常不愿意从工作代码转移到新的改进模型。

如果旧图书馆确实消亡,那是一个逐渐过时的过程,而不是突然的大规模灭绝。

根据库的不同,即将推出的标准可能只是捕获当前函数的快照,而父库将作为 C++1x、C++2x 等的孵化器继续发展。

Adoption of new technology never happens overnight. There will be a lag while compilers implement the new Standard Library versions, and then another lag while those compilers reach developers.

My last two jobs have featured occasional interaction with Visual C++ 6, which is over 10 years old. There is great reluctance to move from working code to a new if improved model.

If old libraries do die, it's through a process of gradual obsolescence rather than sudden mass extinction.

Depending on the library, it's possible that the upcoming standard simply captures a snapshot of current function, and the parent library will continue to evolve as an incubator for C++1x, C++2x and so on.

猥琐帝 2024-10-10 03:47:39

有时,库作者会继续维护他们的库,因为他们的库所做的事情与语言中的做法略有不同:这种差异要么提供了独特的优势,要么从根本上更容易理解。不管怎样,如果有足够的用户希望看到它继续下去,或者如果作者很顽固,它就会继续被维护。但最终,如果优势不够大,人们就会使用语言中自然出现的东西。

Sometimes library authors continue to maintain their library because their library does something slightly different than how it is done within the language: either this difference offers a unique advantage or is fundamentally easier to grok. Whatever the case, if there is enough user desire to see it continue or if the author is stubborn it will continue to be maintained. Eventually, though, people just use what comes naturally in a language if the advantage is not great enough.

找回味觉 2024-10-10 03:47:39

C++ std::thread 很大程度上基于 boost 线程。所以 boost 线程永远不会真正消失,它们将继续存在于标准 C++ 库中。
此外,在许多平台上,Boost 线程使用 posix 线程作为后端,因此它们也永远不会消失。

C++ std::thread is in large parts based on boost threads. So boost threads will never really disappear, they will live on in the standard C++ library.
Additionally, on many platforms boost threads use posix threads as backend, so they will never disappear too.

三生殊途 2024-10-10 03:47:39

这样的事还没有发生过。到目前为止,C++ 只有一种实现。

Such thing hasn't happened yet. C++ has only one implementation so far.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文