`restricted` member variables

Alexandru Ermicioi alexandru.ermicioi at gmail.com
Thu Jun 23 10:55:29 UTC 2022


On Thursday, 23 June 2022 at 10:50:30 UTC, Max Samukha wrote:
> On Thursday, 23 June 2022 at 09:44:29 UTC, Dom Disc wrote:
>>
>> If you want your class to be encapsulated the same way, put it 
>> in its own module and make it read only.
>
> ...which resulted in unnatural duplicate names in symbol paths 
> everywhere. Look at Tango, the glorious alternative D standard 
> library, which tried to be classic Java-style OOP. Many (most?) 
> classes there have paths like 'tango.io.device.Device.Device' 
> (https://github.com/SiegeLord/Tango-D2/blob/d2port/tango/io/device/Device.d). (yes, I know that in today's D you can use 'package.d' as a kludge to work around this).

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


More information about the Digitalmars-d mailing list