I have always found this encapsulation / privacy thing vastly overrated. If people want to snoop inside your objects (and discover the data they themselves previously put inside the object) and possibly mess up everything, then it is their responsibility, isn't it?
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James My blog: Imperial Deltronics
| [reply] |
PadWalker FTW. Perl isn't C++. If you want privacy for proprietary software, compile an XS module. Even C/C++ won't stop a determined adversary. For example, in a callback, peeking at the C stack of your caller to get the job done. I've heard that being done in Windows land to get file handles which MS's API doesn't expose to callbacks yet are necessary to know. All the pitfalls aside.
| [reply] |