3 ms·
"With Object-oriented programming, I have to maintain an external state. This is like modifying a global variable within your object. Your methods have to load
by xaedes 9y ago
"With Object-oriented programming, I have to maintain an external state. This is like modifying a global variable within your object. Your methods have to load and manipulate an external variable. And then another method will modify it later."
I like to interprete state as just another input and/or output variable.
This way you can test your object member functions while pretending they are FP functions.