이 글은 C++11 표준을 다룬 Elements of Modern C++ Style 을 읽고 나서 쓴 간단 평입니다.


C++ 언어를 만든 덴마크 사람인 비야네 스트롭스트룹(Bjarne Stroupstrup)은 아래와 같은 말을 했습니다.

“C++11 feels like a new language.” – Bjarne Stroustrup

Wikipedia - Bjarne Stroustrup

Elements of Modern C++ Style 에 나온 코드를 보면 이게 C++ 맞음 하면서 의심할 정도로 현재 쓰이는 C++98 표준과 C++11 표준의 차이를 보여주고 있습니다.


C++11 이 기존의 C++98과 다른 새로운 언어로 느끼게끔 만든 이유를 아래와 같이 설명하군요.( 출처: Elements of Modern C++ Style)

  • They change the styles and idioms you’ll use when writing C++ code, often including the way you’ll design C++ libraries. For example, you’ll see more smart pointer parameters and return values, and functions that return big objects by value.
  • They will be used so pervasively that you’ll probably see them in most code examples. For example, virtually every five-line modern C++ code example will say “auto” somewhere.

(번역이 매우 난감할정도로 한국어로 표현하기 어렵군요. 영어로 읽으면 와닿는 글귀를 한국어로 번역하면 이상하게 발번역되는 상황이라 원문만 넣었습니다.)


Elements of Modern C++ Style 에 나와있는 C++11 표준의 내용을 보니 기존의 C++가 너무 많이 달라서 새로운 언어라고 느낄 정도입니다.


밥벌이로 C++ 코드가지고 난리 치는 사람에게 새로 나온 C++11은 Legacy를 고려하지 않고 아예 새로 만든 거라고 생각될 정도이니깐요.


이제 C++11 표준에 맞춰서 프로그래밍을 해야하는 시기가 오겠군요. (공부할 것은 산더미)

Buy me a coffeeBuy me a coffee

+ Recent posts