3 ms·
In this specific case DEBUGLEVEL should be a constant anyways, and thus assignment should fail, no? Also kind of denoted by being all caps.
by lawl 8y ago
In this specific case DEBUGLEVEL should be a constant anyways, and thus assignment should fail, no? Also kind of denoted by being all caps.
- stan_rogers 8y agoConventions cause assumptions.
- anyzen 8y agoThere are always assumptions being made, no matter what you do. But "uppercase -> constant" is such a generic and cross-platform convention that it should always be followed. This code should never have passed code review for this glitch alone.
- onion2k 8y agoWhich language would stop/warn you assigning the value of a constant to a variable? Doesn't "var = const" just work in most languages?
- eloff 8y agoIt's yoda condition, so const = var would fail.