Hacker News new | ask | show | jobs
by awongh 5101 days ago
absolutely there are those cases, maybe it was just an over simplified example.

Although I also wouldn't say that it simplifies your code... What it does is make the api to that class/object more explicit. At the very least you are keeping the complexity level the same, but you might also be making it more complicated. If you're just talking about the idea of OO encapsulation in general, that's another thing.... Not that I disagree that an explicit api is a good thing.