On 8/28/22 10:47 AM, Yair Lenga wrote:
Hi,

I've noticed Bash code uses "old-style" C89 declarations:
* Parameters are separated from the prototype

Changing to C99-style function declarations is something that's on the list
to do.

* Variables declared only at the beginning of the function
* No mixed declaration/statements

These are indeed style issues that aren't of general concern.

* No block local variables

I use these in some cases where I think they make sense.

Curious as to the motivation of sticking to this standard for new
development/features. Specifically, is there a requirement to keep bash
compatible with C89 ?

For loadable builtins, there are no restrictions. For the mainline bash
code, I'd like to keep it consistent and change it all at once.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/


Reply via email to