Subject: Re: [PATCH 4/8] CodingGuidelines: give an example for control statements

From: Junio C Hamano <[email-masked]>
Date: Thu, 01 May 2014 11:00:32 -0700

David Kastrup <[email-masked]> writes:

>>   - We do not write the noiseword "function" in front of shell
>
> s/noiseword/bashism/

That is outside the scope of this patch, but since you brought it
up...

I did consider between noiseword and bashism when I wrote this part,
and decided against "bashism".  XCU 2.4 "Reserved Words" lists it
(among others) and says

    ... may be recognized as reserved words on some implementations
    ... causing unspecified results

Even if "bash" were not the only shell that uses "function" keyword
to introduce a shell function definition, we wouldn't use it.  As we
say in the introductory part, we may say "It is not in POSIX, but it
is supported so widely and using it give us so great a benefit, so
we do use it" for some things, but "function" is not one of them.

The reason is because it is a noiseword and its use is not necessary
in order to define a shell function.