Comment by kelnos
1 hour ago
Because there's nothing inherently wrong with global variables. In small utilities like these, I would argue it would be less readable to do as you describe.
Sure, in anything larger, or anything that needs to be reentrant, global variables are going to hurt. But this is not that.
No comments yet
Contribute on Hacker News ↗