4 ms·
You are right. Here is procedural: doX(data, args) Here is OO: data.doX(args) The only difference is that you can stop doX(data, args) from modifying parts
by jnash 5y ago
You are right. Here is procedural:
doX(data, args)
Here is OO:
data.doX(args)
The only difference is that you can stop doX(data, args) from modifying parts of data. However you can do the exact same thing in non-OO languages like C or Haskell by using void* (in C) or (in Haskell) modules with hidden constructors.
The only true OO language out there is Erlang. C++/Java/C# etc. are not OO languages.
The idea that OO is modelling the world is BS. You don't ask your shoe to tie itself or ask a tree to chop itself.
And you don't ask an integer to display itself in a dialog in an "OO" language unless you are a bad software designer.