package & protected?

Atila Neves atila.neves at gmail.com
Tue Oct 22 07:21:41 UTC 2024


On Monday, 21 October 2024 at 07:49:18 UTC, Manu wrote:
> So, a great many class members tend to be `protected`... that's 
> just how
> classes are.
> We also avoid `friend` in D with `package`, which I find to 
> often be quite
> useful.
>
> The trouble is... in a high number of cases where I want to 
> make something `package`, it ALSO should be `protected`, but 
> these 2 are mutually exclusive.
>
> This is a problem. We need a way to express both... what's the 
> story here?

My guess is the story is that nobody needed/wanted that before. 
I'm struggling to understand what the use case would be; I would 
love to know what design led to this situation.


More information about the Digitalmars-d mailing list