[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Preventing Bash Variable Confusion
From: |
konsolebox |
Subject: |
Re: Preventing Bash Variable Confusion |
Date: |
Thu, 30 Jan 2020 16:19:01 +0800 |
On Thu, Jan 30, 2020 at 2:40 PM Roger <rogerx.oss@gmail.com> wrote:
> 1) Using an underslash on all capitol variable names just looks ugly in my
> opinion.
If you mean adding an underscore prefix I agree.
> 2) Prefixing variable names with the name of the script (or other lengthy
> prefix) requires more characters I could be using for describing my variable
> or
> function. (If I were writing unreadable code, I probably would not mind.)
Really just useful if you're writing in multiple scripts.
> I've decided to comply with Google's Style guidelines, even though they do not
> pay me a paycheck, but they do give me lots of free stuff. Shrugs, besides,
> the more my Bash scripting looks like C, the easier it is to read.
>
> The can push me away from defining my variables in all capitol letters. They
> can even push me to code in C and Assembly, but just don't push me to script
> in
> Python.
They still allow you to define constants in all-caps. The impact it
makes is not so different with defining globals as such. Try Ruby.
--
konsolebox
- Re: Preventing Bash Variable Confusion, (continued)
- Re: Preventing Bash Variable Confusion, Robert Elz, 2020/01/29
- Re: Preventing Bash Variable Confusion, Greg Wooledge, 2020/01/29
- Re: Preventing Bash Variable Confusion, Roger, 2020/01/29
- Re: Preventing Bash Variable Confusion, Chet Ramey, 2020/01/29
- Re: Preventing Bash Variable Confusion, Roger, 2020/01/29
- Re: Preventing Bash Variable Confusion, Chris F.A. Johnson, 2020/01/30
- Re: Preventing Bash Variable Confusion, Robert Elz, 2020/01/30
Re: Preventing Bash Variable Confusion, konsolebox, 2020/01/29
Re: Preventing Bash Variable Confusion, Greg Wooledge, 2020/01/30