January 21

On Sunday, 21 January 2024 at 07:46:07 UTC, Jordan Wilson wrote:

>

What? I'm sorry, but being happy with module level != not caring about others.

Jordan

You don't know the pain of not having a certain feature,

January 21

On Sunday, 21 January 2024 at 07:51:00 UTC, zjh wrote:

>

You don't know the pain of not having a certain feature,

And this feature has already been implemented, even without any side effects!
They just ignore you!

January 21
On Sunday, 21 January 2024 at 07:11:50 UTC, Jordan Wilson wrote:
> On Saturday, 20 January 2024 at 22:53:15 UTC, privateWHAT wrote:
>>
> I also suspect those that did prefer class level private (I believe this is what Atila prefers), it's not high on their list of priorities.

I wouldn't pay too much attention to him, it's the same guy who bows a gasket every time it comes up. Like he is literally unable to use D without it. I think he's like 12 yo or something.

January 21

On Sunday, 21 January 2024 at 07:52:59 UTC, zjh wrote:

>

On Sunday, 21 January 2024 at 07:51:00 UTC, zjh wrote:

>

You don't know the pain of not having a certain feature,

And this feature has already been implemented, even without any side effects!

class-private is superfluous cruft. You can very easy live without it.
And it has only no side effects, if it is implemented without friends. But without this misfeature it is incomplete.
Therefor it was decided not to implement it.

It would be ok for me to add class-private as is, but only with the guarantee that friends will never be added, no matter how much the people using it cry, because it is sometimes unusable without them.

January 21

On Sunday, 21 January 2024 at 11:46:42 UTC, Dom DiSc wrote:

>

It would be ok for me to add class-private as is, but only with the guarantee that friends will never be added, no matter how much the people using it cry, because it is sometimes unusable without them.

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.

January 21

If you have difficulties to see the logic of module-private, think of a module as a flat:
If you don't want someone to mess with your private stuff, don't live with him in the same flat! Be ensured, locks on every cupboard won't do. You cannot prevent someone within the same flat from messing with your private stuff. Most people realize that at some point in their life, so only few live together in the same flat.
I hope you will also realize at some point in your life, that two classes should not live in the same module - except they are close friends.

January 21

On Sunday, 21 January 2024 at 11:51:59 UTC, zjh wrote:

>

When you need friend, You can put them all in one module.

Jup. But putting things in one module won't do anymore if you use class-private. That's why people using it will soon realize they need friends. But friends are a security hole, rendering private completely useless at all.

So adding class-private without friends is an incomplete feature, that will make nobody happy. But class-private with friends is a misfeature.
Ergo: do not add class-private at all!
All that's possible with class-private is also possible with module-private. But module-private don't has the friends-issue. Everything is good - you only need to realize that.

January 21

On Sunday, 21 January 2024 at 12:17:28 UTC, Dom DiSc wrote:

>

All that's possible with class-private is also possible with module-private. But module-private don't has the friends-issue. Everything is good - you only need to realize that.

A file, just one class, sometimes I hope so, but sometimes I don't want so. I want several classes to be closely related but independent together!

This is harmless, you only need to add a keyword, but you meet the user's needs.
Class level private, increasing one's own selectivity.
Adding redundancy has always been what Walter hopes for, hasn't it?

January 21

On Sunday, 21 January 2024 at 12:53:22 UTC, zjh wrote:

>

Class level private, increasing one's own selectivity.
Adding redundancy has always been what Walter hopes for, hasn't it?

Moreover, modules, classes, and variables private are considered complete.
I don't understand why just drop out class level private ? Just because this is a C++approach, it appears to be the same as C++ without any style?

January 21

On Sunday, 21 January 2024 at 12:53:22 UTC, zjh wrote:

>

This is harmless, you only need to add a keyword, but you meet the user's needs.

Nope, not harmless. It will have maintenance cost.