Required Reading: "How Non-Member Functions Improve Encapsulation"

JN 666total at wp.pl
Thu Oct 26 12:53:38 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.

As a counterpoint. I guess UFCS makes it less of a problem, but 
it's nice when using an IDE to just type foo. , press ctrl-space 
and see a nice list of methods that can be used with the class. 
When having free functions, you don't get to enjoy that :)


More information about the Digitalmars-d mailing list