`restricted` member variables
bauss
jj_1337 at live.dk
Tue Jun 21 11:06:17 UTC 2022
On Tuesday, 21 June 2022 at 08:55:19 UTC, Ola Fosheim Grøstad
wrote:
> On Tuesday, 21 June 2022 at 08:37:55 UTC, Max Samukha wrote:
>> I am actually against any changes to the current situation.
>> Module-level private is *designed* to break encapsulation, so
>> breaking the invariants by module-level functions is expected.
>
> Yes, I agree. Either be consistent with the idea that the
> module is the boundary for encapsulation or not.
>
> It is better to give priority to plugging the holes that
> prevent people from writing code than preventing the compiler
> from accepting ill-conceived programs.
>
> The current D compiler accepts too many programs, but that can
> be fixed with a linter.
D will do anything to not have class private.
More information about the Digitalmars-d
mailing list