Member Functions vs. Free Functions
“If you’re writing a function that can be implemented as either a member
or as a non-friend non-member, you should prefer to implement it as a non-
member function. That decision increases class encapsulation. When you think
encapsulation, you should think non-member functions”
– Scott Meyers, Effective C++
• https://workat.tech/machine-coding/tutorial/
design-good-functions-classes-clean-code-86h68awn9c7q
• Prefer nonmember, nonfriends?
• Monoliths "Unstrung",
• How Non-Member Functions Improve Encapsulation
• C++ Core Guidelines - C.4: Make a function a member only if it needs direct
access to the representation of a class
• Functions Want To Be Free, David Stone, CppNow15
• Free your functions!, Klaus Iglberger, Meeting C++ 2017
22/40