‹ BackHN Continuity

Thread

cp: -r or -R?

127 points · 110 comments · zdw

  1. dataflow · · focus · HN ↗
    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?
    1. kelnos · · focus · HN ↗
      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.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.