Extending D's support for object-oriented design with private(this)

Kagamin spam at here.lot
Sat Apr 27 11:16:08 UTC 2024


On Saturday, 27 April 2024 at 10:58:17 UTC, Arafel wrote:
> On 27/4/24 12:22, Kagamin wrote:
>> In OOP world you enforce contracts with interfaces, not with 
>> access attributes. Do you really come from java?
>
> I don't understand you. Are you arguing that we don't need 
> `private`, or even visibility, at all, because we should just 
> use interfaces?

If you prefer hardcore OOP, yes. Interfaces for contracts is OOP 
best practice.


More information about the dip.ideas mailing list