December 2021
Intermediate to advanced
352 pages
9h 32m
English
C++ is the language with the “wrong” defaults. Among other things, objects are cre-ated mutable unless they are qualified with const. But why is this the wrong default?
There are two things you can do to data: read from it and write to it. In assembly languages this is also known as loading and storing. You load values from memory into registers and store values from registers into memory. It is very unusual to store a value to memory without loading from it first. Similarly, it is very unusual to write to an object without reading from it first. However, it is much more common to read from an object without subsequently writing to it.
Read-only objects are much more ...
Read now
Unlock full access