|
From: Porter, D. <don...@ni...> - 2012-11-20 03:35:27
|
> Backslash-newline substitution
> Andreas Leitgeb suggests that backslash-newline substitution
.. within a brace-quoted word is wrongheaded and should be eliminated. :)
I think that's very likely correct. At least we ought to try it out
and see if anything breaks. If so, then we'll learn why we have this
weird exception in the parser. Over the years as the parser's been
through a number of reforms, I've always retained this out of fear
of changing anything, but never getting why it was done this way.
It should be a fairly simple patch in Tcl_ParseBraces() if someone
can get to making the branch to try it out before I find time between
the turkey and the pumpkin pie (and the multi-state drive, and ...)
On a similar topic, where the wart isn't all that apparent unless you go
looking for it, consider this quirk of list element formatting:
% list a{b]c}d
a{b\]c}d
Tcl's needs for element quoting for its lists would be satisfied with
this alternative:
% list a{b]c}d
{a{b]c}d}
which is tidier to my eye, and more importantly, which can be
achieved with far less complex code.
Trying out this one is an easy patch. Find the line
#define COMPAT 1
in tclUtil.c and change it to
#define COMPAT 0
Again, if someone gets that on a branch before I find time, that would be
great. I'll be interested if the changes actualy matter to anyone (other than
some test suite result updates, I suppose.)
DGP
|