[petsc-dev] How to enforce private data/methods in PETSc?

Jed Brown jed at jedbrown.org
Sat Aug 11 23:40:18 CDT 2018


Jeff Hammond <jeff.science at gmail.com> writes:

> https://stackoverflow.com/questions/27778908/define-private-to-public-in-c/27779038#27779038

Of course, but my point stands: data hiding is only as strong as the
mores and norms of clients.  Even if the private header is unavailable
to the client, offsets can be reversed relatively easily to do dirty
things.  Raymond Chen tells stories of MS preserving seriously private
implementation details because some important users perversely evaded
their attempts to hide them.  Once the binaries are in the wild, MS
would get the blame if a new Windows broke those apps.


More information about the petsc-dev mailing list