[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49de9bba-d232-45a6-aa49-d1b502b378f7@kernel.org>
Date: Fri, 29 Dec 2023 17:42:17 -0700
From: David Ahern <dsahern@...nel.org>
To: Stephen Hemminger <stephen@...workplumber.org>,
Eli Schwartz <eschwartz93@...il.com>, David Ahern <dsahern@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH iproute2 1/2] configure: avoid un-recommended command
substitution form
On 12/29/23 2:36 PM, Stephen Hemminger wrote:
> On Wed, 27 Dec 2023 22:57:10 -0500
> Eli Schwartz <eschwartz93@...il.com> wrote:
>
>> On 12/27/23 7:46 PM, Stephen Hemminger wrote:
>>> On Sun, 17 Dec 2023 22:30:52 -0500
>>> Eli Schwartz <eschwartz93@...il.com> wrote:
>>>
>>>> The use of backticks to surround commands instead of "$(cmd)" is a
>>>> legacy of the oldest pre-POSIX shells. It is confusing, unreliable, and
>>>> hard to read. Its use is not recommended in new programs.
>>>>
>>>> See: http://mywiki.wooledge.org/BashFAQ/082
>>>> ---
>>>
>>> This is needless churn, it works now, and bash is never going
>>> to drop the syntax.
>>
>>
>> Per the patch message, the reason to avoid the syntax is because it is
>> confusing, unreliable, and hard to read.
>>
>> It was deprecated for good reason, and those reasons are relevant to
>> people writing shell scripts! Regardless of whether it is removed, it
>> has several very sharp edges and the modern alternative was designed
>> specifically because the legacy syntax is bad to use *even in bash*.
>>
>> (bash has nothing to do with it. But also, again, this is not about bash
>> because the configure script shebang is *not* /bin/bash.)
>
> The existing configuration was built incrementally over time.
> Mostly as a reaction to the issues with autoconf.
>
> Perhaps it is time to consider updating iproute2 to a modern build
> environment like meson that has better config support.
>
I do find $(...) much more readable than `...`; those little tick marks
can get lost on a screen with any dust for example.
Powered by blists - more mailing lists