1 Making programs safer

This chapter covers

  • Identifying programming traps
  • Looking at problems with side effects
  • How referential transparency makes programs safer
  • Using the substitution model to reason about programs
  • Making the most of abstraction

Programming is a dangerous activity. If you’re a hobbyist programmer, you may be surprised to read this. You probably thought you were safe sitting in front of your screen and keyboard. You might think that you don’t risk much more than some back pain from sitting too long, some vision problems from reading tiny characters onscreen, or even some wrist tendonitis if you happen to type too furiously. But if you’re (or want to be) a professional programmer, the reality is much worse than this.

Get The Joy of Kotlin now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.