bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] test-framework-sh: fix spelling typo


From: Bruno Haible
Subject: Re: [PATCH] test-framework-sh: fix spelling typo
Date: Mon, 15 Jan 2024 17:59:59 +0100

Paul Eggert wrote:
> -  saved_IFS="$IFS"; IFS="$PATH_SEPARATOR"
> +  save_IFS="$IFS"; IFS="$PATH_SEPARATOR"

That wasn't a typo. It was intentional. Variables should be of the
form
   _noun_
or
   _adjective_noun_
describing what they designate. A variable named

   _verb_noun_

is confusing because it does not tell what it contains. (Is it a boolean
that designates whether to save IFS? Or the value of IFS that needs to be
saved? Or the value of IFS that was saved?)

Customarily, a variable named

   _verb_noun_

means

   _must_verb_noun_

or

   _need_verb_noun_

I propose to rename:
  save_IFS -> saved_IFS
  save_errno -> saved_errno
  save_alloc -> saved_alloc
(exclusing lib/strptime.c, which is shared with glibc). OK?

Bruno






reply via email to

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