DEV Community

Discussion on: OOP is great! And here is why!

Collapse
 
theelectricdave profile image
David S.

What was the benefit?

Collapse
 
fpuffer profile image
Frank Puffer

There are cases where it makes sense to encapsulate stuff in objects as opposed to functions. These are probably the ones where you can come up with a really good (descriptive) name for the class.

There are probably even a few domains where inheritance makes code easier to understand, sometimes one has to deal with these strictly hierarchical structures. UI component libraries might be an example but I am not sure.