3 ms·
Const is the reverse. Constness is infectious down the stack (the callee of a const function must be const) while asyncness is infectious up the stack (the cal
by Calavar 11mo ago
Const is the reverse.
Constness is infectious down the stack (the callee of a const function must be const) while asyncness is infectious up the stack (the caller of an async function must be async). So you can gradually add constness to subsections of a codebase while refactoring, only touching those local parts of the codebase. As opposed to async, where adding a single call to an async function requires you to touch all functions back up to main