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

Encapsulation doesn't necessarily mean hiding state. It means hiding the implementation details of how actions mutate the state. The same action called on a different kind of module instance can end up mutating the instance's internal state in a completely different way. The higher level logic should not be concerned with how a module performs an action.



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

Search: