This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: preferences fixes


The problem is that double quotes are a world of hurt in Tcl. However,
if the rest of the code uses it, please continue.

Curly braces will Do The Right Thing unless you have variable
substitution. Double quotes can introduce subtle bugs which can only be
detected at run time.

Tom Tromey wrote:
> 
> >>>>> "Syd" == Syd Polk <spolk@redhat.com> writes:
> 
> >> +    puts $fd "\# GDBtkInitVersion: 1"
> 
> Syd> I would prefer:
> Syd>    puts $fd {# GDBtkInitVersion: 1}
> 
> Syd> I only use double-quotes when there are special characters when I
> Syd> need to do variable substitution.
> 
> I'll make this change.  However, I tend to use double quotes for
> "string-like" objects, whereas I almost never use braces for that
> purpose.  (Tcl also enforces my style in string `==' expressions in
> `expr'.)
> 
> My style seems more in keeping with what is used in the rest of gdbtk.
> For instance, the puts just before the one I added has uses the same
> style.
> 
> Tom

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]