const and Visual Noise
Learn how const brings tons of visual noise.
We'll cover the following...
Description
If we convert all unchanging variables to const
variables, we will pollute the code. Not only will our code be less readable, we will also need to type more.
This is a common argument. To be fair, this argument is right to a certain extent.
auto numberOfDoors{2u};
is indeed shorter than
const auto numberOfDoors{2u};
However, typing const
or typing ...