At first glance, the object-oriented approach and the functional ideal of programming clash. One refers to objects that change state and respond to messages; the other appeals to the purely mathematical notions of functions and sets. Similarly, object-oriented programmers use patterns to design programs and parts of programs, while functional programmers heavily rely on pattern-matching and recursion.In this talk I compare the two programming paradigms in four different respects:
By focusing on the essence of these four aspects, we discover that functional programming and object-oriented are closely related, and why the two communities can and should readily exchange results and ideas.
- the perception of what matters
- the underlying computational model
- methods of program design
- tools for abstraction, i.e., creating single points of control