1.6 Recommended reading
Because the R community mostly consists of data scientists, not computer scientists, there are relatively few books that go deep in the technical underpinnings of R. In my personal journey to understand R, I’ve found it particularly helpful to use resources from other programming languages. R has aspects of both functional and object-oriented (OO) programming languages. Learning how these concepts are expressed in R will help you leverage your existing knowledge of other programming languages, and will help you identify areas where you can improve.
To understand why R’s object systems work the way they do, I found The Structure and Interpretation of Computer Programs1 (Abelson, Sussman, and Sussman 1996) (SICP) to be particularly helpful. It’s a concise but deep book, and after reading it, I felt for the first time that I could actually design my own object-oriented system. The book was my first introduction to the encapsulated paradigm of object-oriented programming found in R, and it helped me understand the strengths and weaknesses of this system. SICP also teaches the functional mindset where you create functions that are simple individually, and which become powerful when composed together.
To understand the trade-offs that R has made compared to other programming languages, I found Concepts, Techniques and Models of Computer Programming (Van-Roy and Haridi 2004) extremely helpful. It helped me understand that R’s copy-on-modify semantics make it substantially easier to reason about code, and that while its current implementation is not particularly efficient, it is a solvable problem.
If you want to learn to be a better programmer, there’s no place better to turn than The Pragmatic Programmer (Hunt and Thomas 1990). This book is language agnostic, and provides great advice for how to be a better programmer.
Abelson, Harold, Gerald Jay Sussman, and Julie Sussman. 1996. Structure and Interpretation of Computer Programs. MIT Press.
Hunt, Andrew, and David Thomas. 1990. The Pragmatic Programmer. Addison Wesley.
Van-Roy, Peter, and Seif Haridi. 2004. Concepts, Techniques, and Models of Computer Programming. MIT press.
You can read it online for free at https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html↩︎