Le 30/03/2012 07:29, Nick Sabalausky a écrit :
"Steven Schveighoffer"<[email protected]>  wrote in message
news:[email protected]...
On Friday, 30 March 2012 at 01:55:23 UTC, Nick Sabalausky wrote:

Yea, that occurred to me, too.<wishful musing>I've been starting to
think
more and more that the "everything in a module is a friend" was a
mistake,
and that we should have instead just had a "module" access specifier like
we
have "package".</wishful musing>

I don't think it was a mistake, it makes perfect sense to me.  On the
other hand, I fully understand why Meyers' prescription is useful for
humongous code bases.  However, I don't see this causing much trouble for
code I write.

For instance, you have two classes you may have put into the same module
because they are categorically related (not necessarily friends in C++
terms).  It's highly unlikely that you "accidentally" access private
information across the classes.  So how much time is "wasted" checking the
other class for external references?  Probably none.


Large portions of D's access specifiers were completely unenforced for a
long time and it never caused me much trouble. Doesn't mean they didn't
still need to enforced.



Because projects were small.

Reply via email to