how to make private class member private

psychoticRabbit meagain at meagain.com
Sun Mar 18 10:45:55 UTC 2018


On Sunday, 18 March 2018 at 10:14:30 UTC, Alain Soap wrote:
> BTW i think adding this can be useful. The FreePascal language 
> has `strict private` for example.

" Private - All fields and methods that are in a private block, 
can only be accessed in the module (i.e. unit) that contains the 
class definition. They can be accessed from inside the classes’ 
methods or from outside them (e.g. from other classes’ methods)"

" Strict Private - All fields and methods that are in a strict 
private block, can only be accessed from methods of the class 
itself. Other classes or descendent classes (even in the same 
unit) cannot access strict private members. "

https://www.freepascal.org/docs-html/ref/refse34.html

interesting...someone else clearly had the idea.

hey..perhaps I'm not a moron after all.


More information about the Digitalmars-d-learn mailing list