Hacker News new | ask | show | jobs
by quietbritishjim 1031 days ago
Elegant means written in the simplest, clearest way possible.

Agreed, a complex application riddled with global variables is not elegant.

In a fifty line self-contained script, global variables are often the simplest way to go. Turning the code into a reusable class with member variables, which will never be reused, is not simpler. YAGNI.