博客更新得越来越不频繁,一方面是忙+懒,另一方面围脖带来的写作习惯的变化,越来越多的想法使用140字以内的只字片语发布在围脖上。而WP上还 没有像twitter tools一样的围脖反向更新工具,所有的围脖相关工具不是登录绑定就是发博同步至围脖。可见国内互联网产品业余开发人员的同质与乏善可陈,难道要我自己 用PHP去写一个?
最近发现在team里的一些讨论邮件还是有点意思的,我发表了一些观点,也进行了一些讨论。这些邮件算是一个观点展示、碰撞的积累。今天开始转贴一些,当然前提是非IBM confidential的。以下是第一篇
C++11 中值得关注的几大变化(详解)
原文出自酷壳
Me:Like Java & C#, C++ started to introduce many language sugars into the new version 11 (to make the language up-to-date), esp. for Lambda grammar, which is deferred to Java 8. Another highlight is the standard thread lib, wonder if it supports multi-core architecture well.
Jacob:We took so long time to wait this new standard(1998–>2003–>2011); And we still need some times to wait the compiler to support them. It is a pity that we did not find new “Regular Expression” at C++11; I think it is a very useful specific. Maybe Boost still can be used for it. “wonder if it supports multi-core architecture well”,I am also wondering. Actually, There are some product can support it well: OpenMP(Intel), VS2010. I guess parallel computing especially GPU is a trend in desktop usage.
Me:Agree that more and more programmers have already moved their compute-intensive (C/C++) code to GPU – which provides much more throughput. Hope Java could provide such feature in the future release.
-- EOF --
除非注明(如“转载”、“[zz]”等),本博文章皆为原创内容,转载时请注明: 「转载自程序员的信仰©」
本文链接地址:关于『C++11 中值得关注的几大变化(详解)』
Xiyue Deng
C++11 中的重要新内容(核心语言):
(1) 更好的范型支持,如:
* 变长模板(variadic template)
* 外部模板(extern template)
* 模板别名 (template typedef)
* 类型推理 (auto/decltype)
(2) 语言级并发支持
* 改进内存模型,更好的原子操作模型 (atomic)
* 语言级别并发支持
其他语言级别的革新包括:移动语义 (move semantics),右值引用 (rvalue reference),unicode 支持,统一初始化语法 (std::map dictionary = { {“template”, u8″模板”}, {“generic”, u8″范型”} };),lambda 表达式,基于范围的 for 语法 (range-based for),定长整数类型(C99 兼容),继承方法标记 (override, final),等等。
标准库增加了更多内容,包括 regex, threading, tuple, unordered (hash) containers, smart pointers, special math functions, etc.
具体参见 Bjarne Stroustrup 的 C++0x FAQ: http://www2.research.att.com/~bs/C++0xFAQ.html