Skip to main content
added 11 characters in body
Source Link
Jon Purdy
  • 20.6k
  • 9
  • 65
  • 95

For one thing, use the STL. Above all, know your containers (vector, deque, list, map, set, etc&c.) and their performance characteristics; and havecharacteristics. Have a solid understanding of where and how to apply even the basics (for_eachaccumulate, transform, remove_if) of the algorithmic primitives defined in the <algorithm> header. Understand that C++ is a multi-paradigm language, and don'tdon’t try to force everything into the OO model.

If something you'reyou’re doing isn't cleanisn’t plain, legible, and type-safe, chances are you're doing it the C way. Learn the basic standards of type safety, const correctness, reference semantics, and RAII, all things that subtly but hugelyprofoundly set C++ apart from C. Keep up to date on current developments in the language (type inference with auto, lambdas, rvalue references) and apply them to improve the clarity and quality of your code.

For one thing, use the STL. Above all, know your containers (vector, deque, list, map, set, etc.) and their performance characteristics; and have a solid understanding of where and how to apply even the basics (for_each, transform, remove_if) of the algorithmic primitives defined in the <algorithm> header. Understand that C++ is a multi-paradigm language, and don't try to force everything into the OO model.

If something you're doing isn't clean and type-safe, chances are you're doing it the C way. Learn the basic standards of type safety, const correctness, reference semantics, and RAII, all things that subtly but hugely set C++ apart from C. Keep up to date on current developments in the language (type inference with auto, lambdas, rvalue references) and apply them to improve the clarity and quality of your code.

For one thing, use the STL. Above all, know your containers (vector, deque, list, map, set, &c.) and their performance characteristics. Have a solid understanding of where and how to apply even the basics (accumulate, transform, remove_if) of the algorithmic primitives defined in the <algorithm> header. Understand that C++ is a multi-paradigm language, and don’t try to force everything into the OO model.

If something you’re doing isn’t plain, legible, and type-safe, chances are you're doing it the C way. Learn the basic standards of type safety, const correctness, reference semantics, and RAII, all things that subtly but profoundly set C++ apart from C. Keep up to date on current developments in the language (type inference with auto, lambdas, rvalue references) and apply them to improve the clarity and quality of your code.

Source Link
Jon Purdy
  • 20.6k
  • 9
  • 65
  • 95

For one thing, use the STL. Above all, know your containers (vector, deque, list, map, set, etc.) and their performance characteristics; and have a solid understanding of where and how to apply even the basics (for_each, transform, remove_if) of the algorithmic primitives defined in the <algorithm> header. Understand that C++ is a multi-paradigm language, and don't try to force everything into the OO model.

If something you're doing isn't clean and type-safe, chances are you're doing it the C way. Learn the basic standards of type safety, const correctness, reference semantics, and RAII, all things that subtly but hugely set C++ apart from C. Keep up to date on current developments in the language (type inference with auto, lambdas, rvalue references) and apply them to improve the clarity and quality of your code.