May 2019
Beginner to intermediate
466 pages
10h 44m
English
It's mostly about performance. Constants can be especially useful as global values. Because global variables are long-lived and can be modified at any time and from any location in your code, the compiler is having a hard time optimizing them. If we tell the compiler that the value is constant and thus that the type of the value won't change, the performance problem can be optimized away.
Read now
Unlock full access