From mboxrd@z Thu Jan 1 00:00:00 1970 From: Syd Polk To: tromey@cygnus.com Cc: Insight List Subject: Re: Patch: preferences fixes Date: Thu, 30 Nov 2000 21:26:00 -0000 Message-id: <3A273730.43CD1434@redhat.com> References: <873dg9uujv.fsf@creche.cygnus.com> <3A26C48F.FC3BFDB6@redhat.com> <87vgt5t6yk.fsf@creche.cygnus.com> X-SW-Source: 2000-q4/msg00349.html 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 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