News for hackers. Stuff that matters.
Re:The shockingly obsolete code of bash by barrkel on Monday September 29, 2014 @11:07PM (#8386589)
Global variables aren't quite as evil as is made out, in the context of an application like a shell. It's better to think of the shell process as a big fat object instance, which gets forked when it does stuff. It's not ideal, but when the globals are appropriately scoped to translation units (i.e. static, not extern), it's usually not too bad to maintain. Each module acts a bit like a singleton.

Snprintf, implemented as a library function, is also a lot (like 1000x) slower than strcpy; however, I don't condone use of strcpy.

Re:The shockingly obsolete code of bash by andrewchambers on Tuesday September 30, 2014 @12:27AM (#8386761)
Exactly, well designed cli programs are themselves already a self contained object. The global variables are more like members to this instance of the program.