Section 5

Write code well by default

Chapter 5.1   P.4: Ideally, a program should be statically type safe

Chapter 5.2   P.10: Prefer immutable data to mutable data

Chapter 5.3   I.30: Encapsulate rule violations

Chapter 5.4   ES.22: Don’t declare a variable until you have a value to initialize it with

Chapter 5.5   Per.7: Design to enable optimization

Chapter 5.6   E.6: Use RAII to prevent leaks