Focus

deadalnix deadalnix at gmail.com
Fri Jan 18 19:56:00 PST 2013


On Saturday, 19 January 2013 at 03:40:35 UTC, Walter Bright wrote:
> On 1/18/2013 6:50 PM, Andrey wrote:
>> And for that reason we have a simple helper "friend" in C++.
>
> C++ friends are quite complex and are a giant pain. D's method 
> of everything in a module being implicitly a friend has been 
> working very well for 10 years now.

That is also the way to go IMO.

The usual definition of encapsulation is way too much object 
centric. In many language, you'll find out that a class == a 
module (or pretty much in practice). This don't fit at all 
multi-paradigm, where D does pretty well.


More information about the Digitalmars-d mailing list