`restricted` member variables

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Wed Jun 22 05:48:22 UTC 2022


On Wednesday, 22 June 2022 at 00:32:59 UTC, forkit wrote:
> The discussion as to whether its even worthwhile to allow 'an 
> option' for members of a class to be private, is senseless. 
> Every programmer should already know the benefit of having 
> private class members.

Yes, it is indeed true that class private ought to be the 
default, but in the meanwhile you can use a convention like 
prefixing with underscore.

It is a bit ugly, but not more ugly than «scope private» or 
«class private».






More information about the Digitalmars-d mailing list