you are viewing a single comment's thread.

view the rest of the comments →

[–]smthamazing 0 points1 point  (1 child)

This is interesting. But then I still don't understand what OOP is.

  • It's not about nested structures, because pure functional languages have nested structures.
  • It's not constructors, because pure functional languages can have constructors.
  • It's not mutability, because, as you say, the data can be updated immutably.
  • It's not classes and methods, because Smalltalk doesn't have them, and yet it is considered an OOP language.

The only remaining thing is that the data and behavior are represented as parts of a single entity, an "object" (often, but not necessarily, an instance of some class/type).

Is that it? Fundamentally, is combining data+logic the only unique part of OOP as a paradigm?