how to make private class member private

psychoticRabbit meagain at meagain.com
Tue Mar 13 12:02:23 UTC 2018


On Tuesday, 13 March 2018 at 11:31:12 UTC, rikki cattermole wrote:
>
> Ah yes.
> You're completely correct if you subscribe to Adam's and 
> ketmar's file sizes expectation.
>
> A D module and package is one level of abstraction. If that 
> level of abstraction starts to fill up and gets large, you 
> split it up.
>
> My rule is soft 1k LOC and hard 2-3k (after that it needs a 
> VERY good reason to stay together).
>
> This makes each file to be very right down to the point and do 
> nothing else.
>
> You should be doing this no matter the language IMO. Just the 
> difference is in Java only one class is publicly accessible per 
> file. Nothing stops you from doing that here either.

Fair enough.

I doubt I'll use your 'lines of code' method as a means of 
encapsulation though ;-)

I have to think more, about what a module is really trying to 
encapsulate.

I'm sure there is a good blog that could come out of this 
conversation.
(not by me though)




More information about the Digitalmars-d-learn mailing list