Hacker News new | past | comments | ask | show | jobs | submit login

The argument about encapsulation was the most confusing for me. I do not see where the problem is in the example he gives: either you want an object of class A to be used by multiple objects (of different classes possibly), and we have no problem, or you want every instance of A to be used by one and only one instance of some class B, and in that case like you said either you make a deep copy / create the object inside the constructor instead of passing it around. (if no state is needed)

I guess he does make a point about inheritance and how confusing it can be, but like you said OOP still has value outside of inheritance.




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

Search: