Inner Modules?

bachmeier no at spam.net
Sat Feb 12 22:03:08 UTC 2022


On Saturday, 12 February 2022 at 21:52:41 UTC, forkit wrote:

> Walter himself acknowleges there is a case for  denying access 
> to private members 'even within a module' - in his article: 
> https://dlang.org/blog/2018/11/06/lost-in-translation-encapsulation/
>
> He provides an explanation of how to go about doing that - ie. 
> 'the package module' (essentially, split modules into smaller 
> ones).
>
> I am of the same opinion here as Walter, except, 'possibly' 
> there is simpler way to achieve this, by the use of inner 
> modules, where the same rules apply as they currently apply to 
> modules.

[This was probably the most recent 
discussion](https://forum.dlang.org/post/tomtejfkfcqdtmzeouvg@forum.dlang.org). If you really don't want to handle it that way, you can write a short script to automate the splitting of your files prior to compilation. My impression, which may be wrong, is that nobody's ever made a strong case that this issue is a sufficient problem to warrant yet another addition to an already large and growing language.


More information about the Digitalmars-d mailing list