`restricted` member variables

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Thu Jun 23 05:41:19 UTC 2022


On Wednesday, 22 June 2022 at 23:55:17 UTC, Paul Backus wrote:
> Nobody denies that the ability to create more fine-grained 
> security barriers has *some* utility in *some* situations. The 
> question is, does it provide *enough* utility in *enough* 
> situations to justify the addition of a new language feature?

Stronger typing is desirable in complex performance oriented 
system level programming. This is the biggest weakness of C. 
Modules are clearly weaker than class/struct level protection. 
Weaker typing is not better in this context.

But «private(this)» is inconsistent and ugly. Other languages 
being ugly is not a good excuse. Most fields should be marked 
class private and that makes this uglieness a burden.


More information about the Digitalmars-d mailing list