Kind of off topic, but why in the world in 2026 do POSIX utilities still rely on global variables to pass around state? Is it too complicated to pass around a struct address in C or something?
Because why not? "Globals bad"? goto is still being used where it makes sense as well.
It's a good rule of thumb to avoid them both, especially when you're inexperienced yet, but they still have their uses - as implied by it being a "rule of thumb".
dataflow · · focus · HN ↗
seba_dos1 · · focus · HN ↗
It's a good rule of thumb to avoid them both, especially when you're inexperienced yet, but they still have their uses - as implied by it being a "rule of thumb".