We need an internal keyword.

Laurent Tréguier laurent.treguier.sink at gmail.com
Sun Oct 21 21:53:31 UTC 2018


On Sunday, 21 October 2018 at 17:48:08 UTC, Neia Neutuladh wrote:
> On Sun, 21 Oct 2018 08:40:36 +0000, Laurent Tréguier wrote:
>> This is by design; the D way of dealing with this would be to 
>> split the module into a package with multiple modules.
>
> This is often a usable way of doing things, but sometimes not 
> so much. If you're writing a script for use with dub --single 
> or rdmd, you lose a lot of convenience if you use multiple 
> files. It might also take a lot of time to split things up once 
> static constructors get involved.

As far as single file scripts go, I don't think something like 
100% perfect encapsulation is always required. A single file 
script is usually a quick way to do a specific thing once or 
twice, and not a persistent project demanding the best code 
quality.


More information about the Digitalmars-d mailing list