Non-ugly ways to implement a 'static' class or namespace?

Ali Çehreli acehreli at yahoo.com
Thu Feb 9 20:05:06 UTC 2023


On 2/8/23 04:07, zjh wrote:

 > Last time, someone proposed to add `private` like `C++'s`,

We've discussed the 'private' topic very many times already. C++'s 
private necessitate the 'friend' keyword, which comes with it's own 
problems.

Besides, D has zero problems with its private implementation in the 
sense that there has been zero bugs related to it being that way. Given 
the number of individuals who bring this topic up over and over up is so 
few that I don't think there is a common problem.

Do you have actual bugs related to this? "Wanting" the inclusion of a 
feature is sufficient.

In contrast, I use D every day and love its relaxed attitude towards 
private.

 > and then it
 > was the same,they are always unwilling to add facilities useful

That is not correct. The truth is, nobody is jumping to implementations 
just because some people think they are useful. There are always valid 
reasons for including a feature or not.

Ali



More information about the Digitalmars-d-learn mailing list