private(this) vs LINT

Max Samukha maxsamukha at gmail.com
Fri Jul 1 06:15:48 UTC 2022


On Thursday, 30 June 2022 at 14:55:47 UTC, The Zealot wrote:

> e.g.
> ```
> interface Foo {
> }
> Foo fn() {
>    static class Bar : Foo { int private_x; } // private_x 
> access is limited to fn() scope
>    return new Bar ();
> }
> ```

A way to success: impose an unnatural level of encapsulation and 
then offer a bunch of ugly kludges to work around that.


More information about the Digitalmars-d mailing list