Module-level privacy
KingJoffrey
KingJoffrey at KingJoffrey.com
Sun May 13 05:51:07 UTC 2018
On Sunday, 13 May 2018 at 05:11:16 UTC, Neia Neutuladh wrote:
> Nobody's getting worked up about this, and nobody's telling you
> to stop talking about it. There have been suggestions that you
> write up a DIP for it. This is a standard process for
> suggesting improvements to D.
>
> Your complaint is about protection, not about classes. It
> should affect all definitions. Perhaps you simply don't expect
> type-level encapsulation for structs and top-level declarations.
First, this thread was about extending the capabilities of
classes in D with some new attribute/capability - sealed.
I thought it was first important to point out, in this thread, as
opposed to a separate thread, that classes in D are already
problematic, because modules do not respect the encapsulation
boundaries of classes, and any discussion about further extending
classes should be approached with great caution - because the
problem will only become even more entrenched.
Second, writing a DIP is pointless, since Walter likes the idea
that the module doesn't protect the encapsulation boundary of the
class. Now if Walter thinks that's fine, what is a DIP going to
do? I mean really. I have better things to do.
Third, those who responded to my caution are the ones that should
have created a separate thread, not me.
Finally (and I do mean finally), my concern about the loss of the
encapsulation boundary of classes in D, has a very real impact on
the quality and maintainability of software systems developed in
D. That the designer of D apparently thinks otherwise, baffles me.
More information about the Digitalmars-d
mailing list