|
|
|
|
|
by tialaramex
491 days ago
|
|
Just two of the "rules" is enough to see that there's no sense here: 1. It should be hard or impossible to use incorrectly. For example, counter() keeps increments consistent.
2. If you change observable state, restore it. That can be summarised as "To prevent mistakes: Don't make any mistakes". It made lots of sense once I saw this was by a C++ programmer, C++ is the language with, as a prominent C++ practitioner put it: False Positives for the question: Is this a valid program? If you're used to a language which gaslights you by having the compiler not emit any diagnostics whatsoever and just calmly handing you a nonsensical output executable because what you wrote was subtly wrong obviously global variables seem fine, what's not to like? You just have to be inhumanly competent at all times, which was the baseline requirement for the entire language. |
|