C++ 11's new style, explained by Bjarne Stroustrup
Spanish version / Versión en Español In a series of very interesting presentations in Microsoft's GoingNative2012 event, C++'s main creator, Bjarne Stroustrup himself, talked about the programming style introduced by the brand new C++11 standard. The main focus of Bjarne's presentation was not the new language features , but how to use them correctly; that's what he calls "style". Up next, a summary of the key points raised: Type-rich interfaces: Programmer-defined suffixes can now be used to indicate measuring units (see the new constexpr keyword). Use RAII to handle resources: memory, files, sockets, hardware, operating system resources (threads, mutexes, semaphores, etc). Avoid raw pointer usage, specially in public interfaces (restrict those usages to single method implementation scope). Use smart pointers classes such as unique_ptr and shared_ptr . Don't use the latter if the resource needs to be shared. And before con...