Mutable Constants¶
Mutable globals that look like immutable constants (e.g. following
ALL_CAPS
naming convention) can lead to hard-to-find bugs. If possible, it’s
better to use an immutable global instead.
Alternatives:
Before |
After |
---|---|
|
|
|
|
|
Mutable globals that look like immutable constants (e.g. following
ALL_CAPS
naming convention) can lead to hard-to-find bugs. If possible, it’s
better to use an immutable global instead.
Alternatives:
Before |
After |
---|---|
|
|
|
|
|