Stephane CHAZELAS a écrit : > By convention, _environment_ variables are upper-case, which helps > in a shell script to distinguish them with ordinary variables. I > would consider shell scripts with all upper-case variables to be > poorly written, and I agree with the fact that it looks like > yelling and is less easy to read.
> It's OK to use upper-case for environment variables as you > generally want to have the environment as small as possible. This looks indeed like a larger Unix tradition than just a shell script one. John mentioned C macros, but Sun's Java conventions also recommend UPPER_CASE for constants. Hasn't Perl the same convention? Here I purposely confuse globals and constants since they overlap a lot in practice (the less mutable are the globals, the safer). In languages lacking actual namespaces it is a useful convention to have all globals isolated into the well-known "upper case namespace".