Adding a new design constraint to D

The Zealot zod at zod.zod
Tue Jun 14 14:07:38 UTC 2022


On Tuesday, 14 June 2022 at 13:55:57 UTC, Chris Katko wrote:
> On Tuesday, 14 June 2022 at 05:43:49 UTC, forkit wrote:
>> [...]
>
> I just want to +1 this. Even if I had to use a compiler switch.
>
> 'private' exists in many languages and has survived the test of 
> time. Just because you don't use it doesn't mean other people 
> don't--especially with D's bias toward gigantic 3000+ line 
> module files. And if you don't like it, I don't see why you'd 
> be suffering when it's an opt-in feature and you can just not 
> use it.
>
> [...]

you can do that already too. move the class to it's own module 
and mark members as public.
then one at a time, turn them into private one by one. and you'll 
end up with the class in it's own module, where it actually 
belongs.


More information about the Digitalmars-d mailing list