help-gawk
[Top][All Lists]
Advanced

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

Re: Make awk more friendly to multiline function declaration


From: Peng Yu
Subject: Re: Make awk more friendly to multiline function declaration
Date: Wed, 30 Mar 2022 17:41:55 -0500

The point is whether awk can be made more resilient to different types
of users' input or not.

The requirement of an extra backslash is unnecessary. Removing that
requirement can leave users with the freedom to format the code in
multiple lines. This is especially true when awk lacks the concept of
local variables. In that case, putting "local" variables in separate
lines will make the code more readable. This should be a rather common
thing to experience when you start writing awk functions.

Awk syntax should make it easier for users by not requiring an extra
backslash to be added when the comma is at the beginning of the line.

On 3/30/22, Neil R. Ormos <ormos-gnulists17@ormos.org> wrote:
> Nelson H. F. Beebe wrote:
>
>> Peng Yu <pengyu.ut@gmail.com> has asked about
>> changing gawk's grammar to permit newlines
>> between parameter names and commas.
>
> Missing from this discussion has been serious consideration of whether Gawk
> users might benefit from the proposed relaxation of the grammer.
>
> The original poster did not describe any benefits other than relief from
> what the poster views as an artificial restriction.
>
> It might be helfpul to understand how the original poster believes the
> proposal would have some material effect in making it easier to write Gawk
> programs or making the language easier to learn and remember.  Does the
> existing rule impose some unreasonable burden on a particular class of users
> that relaxing the grammar would alleviate?
>
>


-- 
Regards,
Peng



reply via email to

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