Discussion about this post

Commenting has been turned off for this post
Jason's avatar

Encapsulation is more than hiding data though. Encapsulation means hiding implementation details, data being one of them. Private methods are one example; they are implementation details, therefore should not be exposed. Ideally code should only depend on interface/contracts.

Expand full comment
1 more comment...

No posts