C ++ 0x将不再有概念。意见?这将如何影响你? [英] C++0x will no longer have concepts. Opinions? How will this affect you?

查看:162
本文介绍了C ++ 0x将不再有概念。意见?这将如何影响你?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在2009年7月 C ++ 0x meeting in Frankfurt ,it was decided to 从C ++ 0x中删除概念。个人而言,我很失望,但我宁愿有一个可实现的C ++ 0x比没有C ++ 0x。他们说他们将在以后添加。



您对此决定/问题有何意见?

解决方案

我个人并不太高兴,因为概念的目的主要是改善编译时错误消息,作为概念提案的共同作者之一Jeremy Siek写道( http://lambda-the-ultimate.org/node/3518#comment-50071 ):


虽然概念提议不是
完美的(可以扩展到C ++
真的是完美的吗?),它将
提供了一个非常有用和
有用的扩展语言,一个
扩展将彻底
减少臭名昭着的错误消息
模板
库的当前用户困扰。


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



EDIT:Herb Sutter也在他的博客上写道: p>


问:这不是C ++ 0x的一个大的
功能吗?



A:不会。概念会很好,但对于大多数用户来说
,存在或
缺少概念将使得
与他们的经验不同
C ++ 0x b
$ b

Q:不是关于添加主语的概念
语言的新表示力,
,因此启用主要的新型
程序或编程风格?



A:不是真的。概念几乎是
完全关于得到更好的错误
消息。



At the July 2009 C++0x meeting in Frankfurt, it was decided to remove concepts from C++0x. Personally, I am disappointed but I'd rather have an implementable C++0x than no C++0x. They said they will be added at a later date.

What are your opinions on this decision/issue? How will it affect you?

解决方案

Personally I'm not too unhappy of the removal as the purpose of concepts were to mainly improve compile time error messages, as Jeremy Siek, one of the co-authors of the Concepts proposal, writes (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.

Of course concepts had more purpose than just enable the compilers to give shorter error messages, but currently I think we all can live without them.

EDIT: Herb Sutter also writes on his 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将不再有概念。意见?这将如何影响你?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆