Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Environment variables also suck due to having zero typo existence. Write FOO_BAR instead of FOO_BARS? Silent failure. V1 of your package recognizes FOO_BAR and V2 changes it to FOO_BARS (because now we can have more than one)? Silent failure.


In a shell script, set -u. It’ll terminate if you reference an unset variable.

In other languages, check that the var you pulled in isn’t falsey before proceeding.


> In a shell script, set -u

Won't help. I'm _running a program_ want to configure it with environment variables, not _writing a program_ that I expect the user to configure for himself.

> falsey

There are more than two programming languages in the world.


> There are more than two programming languages in the world.

Great, then you know how to check it in your language of choice.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: