int first_argument;
int second_argument;
void add_numbers(void) { return first_argument + second_argument; }
// to call it you'd do first_argument = 1; second_argument = 2; int three = add_numbers();
> This is, I trust you all agree, terrible.
This isn’t really a case against environment variables per say but against global config variables generally. Whether it comes from the environment or a config file that state will be global. So the example of adding globally defined integers is obviously silly, but if you change those variables to a username and password strings then change the function to db_connect it makes sense.