The main problem with const is that it's ugly, it's viral and it does not add any value to the code.
And I know all the supposedly good things about this, but I never found any real usage in practice.
The main problem with const is that it's ugly, it's viral and it does not add any value to the code.
And I know all the supposedly good things about this, but I never found any real usage in practice.
Understanding which object parameters to a function are inputs and which ones are modified is key information about the behavior of a function. It's omission requires devs to divine the intent from the name and hope that every previous dev was a good citizen w.r.t keeping function names accurate to intent.
Finding and replace const with empty is the moral equivalent of replacing all the types of parameters with void*. After all, types are viral and ugly too.
I really hope that intern found a better place to work than your company.
But first, when you're an intern, you have to follow the local codestyle, even if you think it's not ideal.
Second, I think there are much better rules than spamming const to attain the same objective, but you might need more experience to really appreciate that.
Like?
> you might need more experience to really appreciate that.
Practically a picture perfect appeal to authority.
I've been programming in C for 25+ years. const is clutter.
Yes, types can be trivially casted away too. That's not a reason to use void* everywhere.