Why is D unpopular?

Max Samukha maxsamukha at gmail.com
Sat Jun 11 08:23:27 UTC 2022


On Saturday, 11 June 2022 at 01:00:44 UTC, H. S. Teoh wrote:

>
> As I said, opinions differ on this.  You say the class ought to 
> be unit of encapsulation, Walter says it should be the module.

Class is *the* unit of encapsulation by any reasonable definition 
of class-based OOP. You don't create objects of modules (though 
modules can be viewed as singleton objects). You can argue about 
the mechanism of sharing the state between objects of different 
classes, but forcing the programmer to group classes together and 
share the entirety of their state is not the greatest of options.

Disclaimer: Ola may assume I see OOP as god, but I actually don't.


More information about the Digitalmars-d mailing list