Adding a new design constraint to D

deadalnix deadalnix at gmail.com
Sat Jun 18 17:38:21 UTC 2022


On Saturday, 18 June 2022 at 08:04:55 UTC, FeepingCreature wrote:
> I mean, I think it's important in this case because aiui 
> `private` is ignored in modules because modules are the more 
> central unit of abstraction than classes; a function in a 
> module is "on the same level" as a method in the class. So in 
> that specific sense, it's more correct to call D a module-based 
> language than a class-based one.

More importantly, modules are the unit of abstraction over 
implementation. When I open a module, I see all the code that 
implement everything that's in the module. If there is something 
in there that I shouldn't see, then it shouldn't be in the module.

It's very simple really.


More information about the Digitalmars-d mailing list