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

Lawrence Velázquez larryv at macports.org
Sun Jul 7 13:26:49 PDT 2013


On Jul 7, 2013, at 6:36 AM, Joshua Root <jmr at macports.org> wrote:

>> Revision: 107845
>>          https://trac.macports.org/changeset/107845
>> Author:   larryv at macports.org
>> Date:     2013-07-06 21:48:16 -0700 (Sat, 06 Jul 2013)
>> Log Message:
>> -----------
>> macports.tcl: Replace quotes with braces in expressions.
> 
> Quotes aren't actually wrong in this context (other than that it's a bit
> of a wart that expr and if require literal strings to be quoted when Tcl
> in general does not), and I actually prefer quotes for values where
> we're not preventing substitutions that would otherwise happen.

I suppose I look at it the other way. That is, I prefer using quotes if and only if substitution is involved. This also prevents Tcl from checking for substitutions unnecessarily, but I admit that this is certainly premature optimization.

> But in any case, whatever style we agree upon should be used throughout
> the codebase, not just in macports.tcl.

Agreed, but I can only look at one source file at a time :)

vq


More information about the macports-dev mailing list