Arguments Against const

Let’s learn about the arguments against using const before going into its use.

We'll cover the following

What are the arguments against const?

In some cases, const may be a bit verbose, but at the same time, it will make our code more robust. The behavior of our code will be more in line with our expectations. Increasing the use of const will require some adjustments not only from us but others as well. It will not be enough to set up a static code analyzer or implement an additional rule in clang-tidy. Many developers will have to change their attitude about const so that it can be used regularly.

Get hands-on with 1200+ tech skills courses.