On Sat, May 22, 2021 at 9:06 PM Jacob Bachmeyer <j...@gnu.org> wrote:

> This patch series tidies config.guess and reverts to classic backtick
> command substitutions.


I fully endorse reverting config.{sub,guess} to classic backtick command
substitutions. However, Autoconf proper (in 2.70+) will continue to look
for $(...) support in its “better shell” logic. This is because, even
before the 2.70 release, a steadily increasing number of configure.ac’s and
 third party macros were casually using it, having never been tested with
shells that don’t support it.

No shell splits the WORD in "case WORD in ... esac", so instances
> where WORD was quoted were changed.


This change, however, I think is a mistake, because it’s easier to *read*
shell scripts if you don’t make the reader remember this syntax quirk.

Quotes while forming the output are pointless, since no valid GNU
> configuration tuple contains whitespace, therefore no variables
> interpolated will be candidates for word splitting.

[and several other tricks to avoid putting shell variable interpolation
inside double quotes]

>
And again, I think you shouldn’t make people remember or deduce that.

“*All* shell variable interpolations will be inside double quotes, except
when word splitting of the result is *desired*” puts less cognitive load on
people reading the script than “shell variable interpolations will only be
inside double quotes when word splitting is both possible and undesirable.“
Thus it is the style rule I’ve been applying in Autoconf proper, and I
think it’s appropriate here as well.

zw

Reply via email to