3 ms·
It makes it difficult to have const locals if you get some sort of dependency chain based on other locals interspersed with other computation. For example, if y
by maximilianburke 14y ago
It makes it difficult to have const locals if you get some sort of dependency chain based on other locals interspersed with other computation. For example, if you're a const nazi you can't have code like this:
const int x = foo();
// ...
const int y = bar(x);
and also have your variables all declared at the top.
In C++ I'm a const nazi and declare where used to facilitate it, but if I'm writing C that targets the MSVC compiler (C89) where all variables have to be collected at the top of the inner scope I'll relax this as much as I have to.