Non-ugly ways to implement a 'static' class or namespace?

ProtectAndHide ProtectAndHide at gmail.com
Sat Feb 11 03:20:12 UTC 2023


On Saturday, 11 February 2023 at 02:17:09 UTC, thebluepandabear 
wrote:
>> I'm not an advocate of any style in particular. I'm happy to 
>> use any style that is clear to understand and use, suitable, 
>> and can provide reasonable guarantees around memory safety and 
>> correctness.
>>
>> But a language that claims to support OOP but doesn't even 
>> have type privacy, is a bit of joke IMO.
>
> agreed, the current behaviour of `private` is inexcusable, and 
> it's something newcomers need to be warned about.

that wasn't my first 'shock' when I came to D.

My first shock, was that 'public' was default!

New comers should know that before they even begin their first 
line in D.

For a language that claims to supprot OOP, and does public by 
default, and no way to declare type private... I mean... wow!


More information about the Digitalmars-d-learn mailing list