Is D really that bad?
Walter Bright
newshound2 at digitalmars.com
Sun Nov 6 01:56:34 UTC 2022
On 11/5/2022 2:26 PM, Dukc wrote:
> I like the D system. We sort the code to files with similar logic way we sort it
> to namespaces anyway. Having to add a namespace block that encompasses the whole
> file to every single of them is just annoying for no good reason.
>
> Now I wouldn't mind if there was a way to have in-file modules in addition to a
> file being a module (though I'd question if the additional complexity is
> justified), but if I have to pick one or the other I prefer the D system hands
> down.
Using the module as the fundamental unit of encapsulation and making it a 1:1
correspondence with files is a good fit for modern filesystems. (Old filesystems
were so slow most people would try to cram a program into a small number of files.)
Divorcing modules from file names makes for clumsy, hackish attempts solutions
to figuring out which file a particular module resides in.
More information about the Digitalmars-d
mailing list