Code That Says Exactly What It Means

Arafel er.krali at gmail.com
Thu Oct 30 11:30:47 UTC 2025


On 10/30/25 11:20, Zealot wrote:
> and you can simply do this for the exact same result:

That is a slippery slope. Of course you can manage visibility by 
convention: python does it, and is widely successful, whether because or 
in spite of it.

Now the question is that if you go this way... why do you then need any 
visibility attributes at all? Because to me this seems like the worst of 
both worlds: you have some attributes enforced by the compiler, and some 
others enforced by convention. Now that's cognitive load.

Also please don't misunderstand me. While I would prefer and use 
something like `scopeprivate`, I come from java. This means that having 
one class per file* feels kind of good enough to me, so I'm not going to 
make a fuss about it.

*: Actually, you can have more than one class per file, just one public 
one. But it feels really unidiomatic.


More information about the Digitalmars-d mailing list