Most of the developers, when they hear about encapsulation, they think of it as one of the fundamental concepts in object-oriented programming, and it means that the class (or any component of code) exposes only the relevant data to the outside world and hides the internal data as private members, but this principle is more general and powerful than a lot of developers think, and although it is defined in OOP, you can still apply it one way or another in other programming paradigms.

So, what is the encapsulation all about? …

Redan Hassoun

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store