Ok no war here, I’m a noob, but just collating what people say online:
- When dealing with data about people, use functional programming.
When dealing with data to model people, use object oriented programming.
- Immutability is a key aspect of FP - the values are always the same over the existence. Leave the original array untouched and return a copy of the array, edited.
We don’t always know the value of an object at any one point in time, unless you walk through the entire workflow to find out what changes have or have not been done to it.
- FP does not mix data and behaviour. Write standalone methods and pass two arguments - the original data and the value to change it by.
Data is supplied to an object at the time the object is created, in OOP. Then, use the object’s methods to interact with the stored data.
- FP - Blocks of statements which manipulate data.
- OOP - combine data and functionality and wrap it inside something called an object.