Preparing for the New DIP Process
Walter Bright
newshound2 at digitalmars.com
Mon Jan 22 23:01:54 UTC 2024
On 1/21/2024 3:51 AM, zjh wrote:
> When you need `friend`, You can put them all in one module.
> Sometimes, when `multiple classes` are closely related and independent, `class
> level privacy` becomes very important. No one wants , someone from outside may
> secretly steal money from your home.
D does not allow a different module accessing private class members. Private
access is limited to the module enclosing that class.
This encourages a different use of modules than C++ "toss code randomly into
different source files."
More information about the Digitalmars-d-announce
mailing list