Adding a new design constraint to D

The Zealot zod at zod.zod
Tue Jun 14 12:00:29 UTC 2022


> The main difference between @mustuse and private(scope) is that 
> @mustuse was *impossible* to simulate using existing language 
> features, whereas private(scope) can be simulated by extracting 
> the relevant code into its own dedicated module. I understand 
> that you have reasons for disliking this workaround, but the 
> fact that a workaround exists is still relevant when 
> determining what ought to be prioritized.

I don't think calling it a workaround is even correct.
_class private_ would actually be the workaround. Just to put 
multiple classes inside one file that should conceptually not be 
in the same file in the first place.



More information about the Digitalmars-d mailing list