tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/39002: harmful AWK extension: non-portable escaped character
On Sun, Jul 13, 2008 at 04:58:47PM -0400, Greg A. Woods; Planix, Inc. wrote:
>> As far as I can tell what you're claiming is that someone might
>> intentionally write "foo\.c" in a string constant, intending to get
>> the value "foo.c", instead of writing it in the normal way without the
>> backslash.
>
> Exactly, though your example is perhaps pedantic and silly to the extreme.
>
> The point is that the language (as defined for this implementation) clearly
> shows that the string constants "f\o\o\.\c" and "foo.c" will always compare
> as identical, eg. with . Furthermore this makes a great deal of sense and
> is rational behaviour given the context and heritage of the language.
Yes, except for the one catch that nobody needs or wants to do that,
whereas improperly escaped regexps in string constants are a real
issue that bites even experienced awk users.
Thus I repeat: a load of dingo's kidneys.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index