In this back-to-basics C++ talk, Mateusz Pusz discusses the friend keyword, challenging the common belief that it is inherently evil and breaks encapsulation. He explains the proper use of friends in modern C++, including hidden friends, to improve code and reduce compile times. The talk covers access control, customization points, and various idioms related to friendship, emphasizing that misuse, not the feature itself, is the real problem. Pusz also advises against using friends for unit testing and advocates for better design principles like the Single Responsibility Principle to avoid the need for excessive friendship.
Sign in to continue reading, translating and more.
Continue