Some important points taken from "Object-Oriented Programming, Functional Programming and R", by John M. Chambers
arxiv.org/pdf/1409.3531.…
Note that both these paradigms are used in R, and interact with each others.
Wikipedia has a good page about this : en.wikipedia.org/wiki/Side_effe…
The pure function concept is also at the root of the naming of the {purrr} package, as explained here :
github.com/tidyverse/purr…
The more modern being R6: cran.r-project.org/web/packages/R…
- Classes for objects
- Generic function that dispatch methods
- Methods for each class
This is what S3 does: creating functions that dispatch methods to class.
adv-r.had.co.nz/S3.html