Is public by default an unsafe default?
Dukc
ajieskola at gmail.com
Thu May 2 12:09:20 UTC 2024
On Thursday, 2 May 2024 at 11:45:57 UTC, Timon Gehr wrote:
>> It's sensible - that's how C works after all.
>
> Of course, there is no protection against other code making a
> declaration manually, but I think technically even in D you can
> access private symbols over their mangled name.
I think that would, or could fail to work because the compiler
does not necessarily add the private symbol to the export table
of an object file. The linker would then fail to find it.
More information about the Digitalmars-d
mailing list