Re: Feedback on Átila's Vision for D

drug drug2004 at
Sat Oct 19 11:46:21 UTC 2019

On 10/19/19 2:10 PM, Aliak wrote:
> Oh. I see. Statement 1 is that it *can* be bad. And for statement 2, I 
> do not think i state anywhere that it’s bad? I can try and rephrase 
> maybe? (Suggestions?)
> Some languages have moduleprivate and privateprivate. If D had that then 
> you could actually protect your objects, and if you wanted to allow 
> non-state related variables to only the module you could do that too. So 
> functions can access moduleprivate vars and do things that outside 
> modules couldn’t and variables can be fully protected within a class if 
> need be as well.

I agree that in D having private to be in fact moduleprivate is unusual 
comparing to C++ for example. But is it really bad in practice?

More information about the Digitalmars-d mailing list