|
|
|
|
|
by pansa2
490 days ago
|
|
This isn't about general substitutability though, just about naming constants. If you have `case 404:` and you add a named constant `NOT_FOUND = 404`, you can't change the code to `case NOT_FOUND:` because that completely changes its semantics. Given that one of the fundamental rules of programming is "don't use magic numbers, prefer named constants", that's terrible language design. |
|