I would like to understand more about the 'orthogonality' of OOP and functional programming.
What makes me confused is the 'encapsulation' of OOP and 'referential transparency of functional programming. We do often put mutable state(information) as private member variables of a class and have a public method to manipulate them. This clearly goes against the side-effect avoiding of functional programming.
It seems like this kind of problem stands for most of the common OOP classes. I do know that class and inheritance are used to make 'subtypes' in functional programing, which don't have methods but are more like data collection.
I guess maybe the Numpy style methods, which does not modify itself but returns a new instance with intended modification could be a solution.
But still not sure that one could see the implicit argument of method like self as part of input in concerns of 'referential transparency' (f(a) == f(b), if a == b), and stands with 'pure function' concept if the self is immutable but returning a new instance.