3 ms·
To this guy, and many others like him, I would ask one question: "Is your code shorter?". If not, then I can be quite confident the modification was worse than
by loup-vaillant 13y ago
To this guy, and many others like him, I would ask one question: "Is your code shorter?". If not, then I can be quite confident the modification was worse than nothing. (Most of the time, "simpler" and "shorter" mean the same thing.)
When I rewrite code, at least I make sure the result is simpler than whatever I started with. If not, I simply revert back to the the previous version.
- jes5199 13y agowell, the thing is, his version replaced all the code with type annotations. So, in some sense, he replaced a 5 line method with no code at all!