The Design of C++0x
The Design of C++0x는 Bjarne Stroustrup이 CUJ 2005년 5월호에 기고한 글이다. C++0x 디자인의 기본적인 정책에 대해 설명하고 있다.
먼저 C++0x에서의 언어 디자인에 관해서는 최대한 호환성을 고려할 것이지만, 충분한 이익을 얻을 수 있는 부문이라면 호환성에 있어서의 작은 희생도 감수하겠다고 얘기하고 있다.
C++0x will be almost 100-percent compatible with the existing Standard C++. … We aim for compatibility but realize that there may be cases where a large advantage is worth paying for by small incompatibilities.
그리고, C++의 강점은 일반성(generality)라고 얘기하고 있고, 이러한 장점을 강화하는 방향으로 갈 것이라고 얘기하고 있다.
C++’s emphasis on general features (notably classes) has been its main strength, and often its lack of specialized features (such as “properties” and threads0 has been seen as its main weakness. … Nevertheless, we must keep the focus on general features aimed at efficient abstraction; the huge diversity of the C++ community requires that. … The obvious areas where C++ could be improved for greater generality is through better support for generic programming and more flexible initialization/construction mechanisms. Is is also obvious that some support for concurrency is needed as many forms of concurrent, parallel, and distributed programming are becoming common.
프로그래머가 프로그래밍 언어를 대하는 태도에 관한 짤막한 의견.
You don’t want to become a language expert-you want to be (or become) an expert in your own field and know just enough of some programming language to get your work done.
type safety는 compiler optimization 등의 이점을 얻기 위한 중요한 C++의 특성임을 강조하고 있다. 언어의 변경을 위해서 완벽한 type safety를 얻기는 힘들지만, 표준 라이브러리를 통해서 이를 강화하겠다고 얘기하고 있다.
C++0x will not be able to close all the loopholes in the C++ type system, but it will not introduce new holes and it will provide ways of avoiding inherently unsafe facilities-primarily through the Standard Library providing (compile-time or run-time) type-safe alternatives.
C++의 중요한 원칙 중의 하나인 zero-overhead principle을 재확인하고 있다.
That is, the zero-overhead principle: “what you don’t use, you don’t pay for” and “what you use can be implemented without overhead compared with hand coding” is still the bedrock of C++.
라이브러리의 중요성.
A language cannot support everything, but conceivably, a large set of libraries could. … Library extensions will be preferred to language extensions.
표준 결정 과정에서 벤더들에 대한 고려(예를 들어 구현의 용이성)도 중요한 요소임을 강조하고 있다.
The development of C++0x must be timely and to gain acceptance from vendors, new language features must be easier to implement that the most difficult C++98 features. … we dislike dialects. … My suggestion is for programmers to avoid nonstandard features whenever possible.
C++ Programming Language를 읽어보신 분이라면, C++0x 또한 C++의 기본 철학에서 크게 벗어나지는 않는다는 것을 알 수 있을 것이다. 특히 눈에 띄는 점은 라이브러리에 대한 강조.
Whereas we’ll be cautious and skeptical about language extensions, we’ll be aggressive and opportunistic when in comes to new library-especially for libraries that extend the range of portable support for systems programming.