[106983] trunk/base/src/macports1.0/macports.tcl

Joshua Root jmr at macports.org
Thu Jun 13 05:33:55 PDT 2013


> Revision: 106983
>           https://trac.macports.org/changeset/106983
> Author:   larryv at macports.org
> Date:     2013-06-13 00:14:05 -0700 (Thu, 13 Jun 2013)
> Log Message:
> -----------
> macports.tcl: Remove unnecessary braces in variable substitutions.
> 
> There's already a mix of $foo and ${foo} variables, so we might as well
> be consistent. This also reduces visual noise somewhat.
> 
> See https://lists.macosforge.org/pipermail/macports-dev/2013-June/022951.html.

I like omitting unnecessary quoting when the variable is only adjacent
to whitespace, but when it's up against other characters, having the
quoting makes it completely clear where the variable name ends. Without
it, the reader has to know exactly which characters will be treated as
part of the name by the interpreter, and mentally apply those rules,
which means the code is harder to read.

- Josh


More information about the macports-dev mailing list