10 ms·
The key to enforce const correctness is to reverse the default behaviour. Make everything const by default, scrap "const", and introduce "mutable" (or "assigna
by loup-vaillant 15y ago
The key to enforce const correctness is to reverse the default behaviour. Make everything const by default, scrap "const", and introduce "mutable" (or "assignable", or something).
The result hopefully won't feel like a nano-management attempt, while people will think twice before they make anything "mutable".