Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, C++ gave tools and then "language lawyers" started to introduce practically dubious rules where every class has to carefully guard its own variables.

In the saner practice, however, you want to develop subsystems where the classes that are the part of the subsystem cooperate to the common goal, not protect themselves from their peers (some "OO" C++ language lawyers are certainly already offended by my claim). Even if some class is in charge for something, it's easier when more classes can at least see some pieces of the data without making a lot of getters and setters "just because."



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: