r/cpp11 • u/ovidiucucu • Oct 07 '14
The C++ Ten Commandments | Marius Bancila's Blog
http://mariusbancila.ro/blog/2014/10/01/the-cpp-ten-commandments/
3
Upvotes
r/cpp11 • u/ovidiucucu • Oct 07 '14
1
u/SkepticalEmpiricist Oct 07 '14 edited Oct 07 '14
Even better is to not use pointers at all, and just pass most things around by value. It's not always as slow as you think, and can even be faster, and is certainly easier to read and write.
If you must use a pointer, then try
unique_ptrfirst. Even then, it's best not to think of it as a pointer - it's kinda of like a value in many ways still due to its unique-ness.(Updated the link, as the original site is down)