Required Reading: "How Non-Member Functions Improve Encapsulation"
who cares
wsffws at 12345678.cz
Thu Oct 26 06:56:05 UTC 2017
On Wednesday, 25 October 2017 at 22:19:23 UTC, Walter Bright
wrote:
> for core D devs.
>
> "How Non-Member Functions Improve Encapsulation" by Scott Meyers
>
> http://www.drdobbs.com/cpp/how-non-member-functions-improve-encapsu/184401197
>
> Note that I'm as guilty as anyone for not understanding or
> following these guidelines. I expect we can do much better.
I tend to agree. When a member function can be written with only
the public declarations (aka the "public API") it can be set as a
free function. However during my youth i've written lots of huge
classes...now that i don't write much anymore it's too late to
apply the rule :/
More information about the Digitalmars-d
mailing list