Is public by default an unsafe default?

Alexandru Ermicioi alexandru.ermicioi at gmail.com
Thu May 2 19:22:37 UTC 2024


On Thursday, 2 May 2024 at 17:22:25 UTC, Bastiaan Veelo wrote:

> There is nothing that a systems level programming language can 
> do to prevent a creative programmer from accessing the private 
> parts of an API (we are not talking about web APIs). Just 
> mirror the data definition with the `private` keyword removed, 
> and cast the instance to the new definition. With D's 
> introspection capabilities it is even easier than that.

Imho, it's more about protecting from sloppy misuse of api not 
intended to be public from the get go, and lazyiness in properly 
setting private to declarations on a module, not malicious 
reverse engineering.



More information about the Digitalmars-d mailing list