gpt4 book ai didi

C++0x 将不再有概念。意见?这将如何影响你?

转载 作者:可可西里 更新时间:2023-11-01 17:04:00 27 4
gpt4 key购买 nike

在 2009 年 7 月 C++0x meeting in Frankfurt , 决定 remove concepts来自 C++0x。就个人而言,我很失望,但我宁愿有一个可实现的 C++0x,也不愿没有 C++0x。他们说他们将在以后添加。

您对这个决定/问题有何看法?它将如何影响您?

最佳答案

就我个人而言,我对删除并不太不满意,因为概念的目的主要是改进编译时错误消息,正如概念提案的共同作者之一 Jeremy Siek 所写的 ( http://lambda-the-ultimate.org/node/3518#comment-50071 ):

While the Concepts proposal was not perfect (can any extension to C++ really ever be perfect?), it would have provided a very usable and helpful extension to the language, an extension that would drastically reduce the infamous error messages that current users of template libraries are plagued with.

当然,概念的用途不仅仅是让编译器给出更短的错误消息,但目前我认为没有它们我们都可以生活。

编辑:Herb Sutter 还在他的 blog 上写道:

Q: Wasn’t this C++0x’s one big feature?

A: No. Concepts would be great, but for most users, the presence or absence of concepts will make no difference to their experience with C++0x except for quality of error messages.

Q: Aren’t concepts about adding major new expressive power to the language, and so enable major new kinds of programs or programming styles?

A: Not really. Concepts are almost entirely about getting better error messages.

关于C++0x 将不再有概念。意见?这将如何影响你?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1154974/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com