bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [here string] uncompatible change on here string function


From: Greg Wooledge
Subject: Re: [here string] uncompatible change on here string function
Date: Wed, 22 Nov 2017 09:17:54 -0500
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, Nov 22, 2017 at 09:00:09PM +0700, Peter & Kelly Passchier wrote:
> I think you are missing the point. He is claiming/reporting:

Why write code that relies on the idiosyncratic behavior of a shell
when it is given incorrect code?  Whether bash handles incorrect code
in one way or another seems pretty irrelevant, when you should fix the
broken script.

So, an older version of bash used to slap you down hard when you failed
to quote.  And a newer version doesn't; it simply acts as though you
had given the quotes, which allows sloppy code to continue to be written.

One might argue that the newer versions should continue to slap down
the broken code, so that programmers will stop doing it.  But that
hardly seems to qualify as a bug in bash.  Lots of programs swing back
and forth between strictness and lenience.  A counter-argument can be
made that permitting the sloppy code to "work" upholds the maxim of
"be liberal in what you accept".



reply via email to

[Prev in Thread] Current Thread [Next in Thread]