3 ms·
316 arguments is clearly an exaggeration, but there's a reason programmers are admonished against global variables. For example many of the classic Unix utiliti
by ssp 17y ago
316 arguments is clearly an exaggeration, but there's a reason programmers are admonished against global variables. For example many of the classic Unix utilities were built around a pile of global variables, and they could be quite difficult to understand.
Sometimes you see people making fun of programmers who have eliminated the pile of global variables by passing around a pointer to a structure containing all the variables instead. But this actually is an improvement because the type signature of each function now indicates precisely what state can be modified.