Object oriented programming
- combines state and behavior: objects
- interaction: message passing
- behavior templates: classes
- state is protected: encapsulation
- relationships between classes: inheritance
- abstraction: polymorphism
Functional programming
- functions: input => output
- first-class citizens: named, passed as arguments, returned
- programming = composing (small) functions
- declarative, not imperative
- behavior and data are separate
There are no "best" solutions in programming
That's why we need to combine paradigms
Preferably, with low syntax & boilerplate overhead