`restricted` member variables

Max Samukha maxsamukha at gmail.com
Thu Jun 23 11:44:31 UTC 2022


On Thursday, 23 June 2022 at 10:55:29 UTC, Alexandru Ermicioi 
wrote:

> Imho package.d is not a kludge. Such approach is taken in 
> typescript/javascript for example.

It is useful when you need to split a module into multiple 
submodules for other reasons than class-level encapsulation. In 
Javascript, there had been the '_' naming convention until it 
acquired proper class-level private 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields. Typescript has class-level private https://www.typescriptlang.org/docs/handbook/2/classes.html#private


More information about the Digitalmars-d mailing list