I’ve been embroiling myself in C++11 lately, and have to say I like this version of the C++ language a lot more than I’ve liked previous versions. A lot of the rough edges have been cleaned up and there’s some powerful new features as well.
- They did a good job at pulling in a lot of the ‘less controversial’ parts of boost into the STL. Its just easier when you don’t have to juggle STL and boost, and can just use the STL in a lot of cases.
- Spawning a thread is now pretty easy and clean. Thread synchronization mechanisms are very easy to access and clean as well.
- “smart pointers” are growing on me. My C background made me a bit skeptical at first about this memory management model, but I’m beginning to trust them more, and can see some benefits.
- Move semantics are a pretty cool idea for managing memory. It’ll be interesting to see how that pans out in the greater software ecosystem.
There are a lot of points about the new standard that I feel pretty neutrally about. They’re nice to have, but I might not use them that often, like new STL data types or STL regular expressions support.
- Although I’ve come to an understanding with them, r-value vs l-value references are somewhat obscure to understand. I wouldn’t like to be a new programmer learning about this in Computer Science 102 again!
- Compiler support is still coming along, slowly but surely. GCC 4.7 has most of the critical features, but coding with all of the C++11 feature set is still not supported, and (worse yet) I wouldn’t consider the STL support “fully trusted”.
- All the other objects to C++. C++ isn’t short of its detractors. I’m not interested in a compare-contrast with other languages in this post, just sharing my findings about C++11
Overall, I think that C++11 is a good improvement/evolution of the C++ standard. It’ll be interesting to see how code in the wild looks under c++11!