Comment by pansa2
6 months 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.
No comments yet
Contribute on Hacker News ↗