Hacker News new | ask | show | jobs
by brucedawson 3448 days ago
Ignoring the VC++ compiler bug/quirk, the benefits for adding const tend to be small and hard to measure. How do you measure the possible reduction in private pages? How do you measure the productivity gains from slightly fewer corrupted globals.

Usually you don't. You just tag your const globals as such and then get on with your day. Once you develop the habit the cost is zero so measuring the benefits isn't necessary.