bug-bash
[Top][All Lists]
Advanced

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

Re: Are there any plans for more readable, modern syntaxes for If statem


From: Eli Schwartz
Subject: Re: Are there any plans for more readable, modern syntaxes for If statements?
Date: Thu, 12 Mar 2020 17:00:49 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 3/12/20 3:00 PM, Vaidas BoQsc wrote:
> Are there any plans to have alternative, a more modern C or D like syntaxes
> for IF statements, While loop and the like in Bash?
> 
> Would it be better to just make a new shell and command language similar to
> Bash instead of adding these alternatives?

$ if (true) { echo success; }
bash: syntax error near unexpected token `{'
$ alias {=then }=fi
$ if (true) { echo success; }
success

Is this what you wanted? :p

Personally, I don't really see the problem. I already need to remember
how to do these in multiple languages, and any of them look weird from
the context of another language. Can you describe why you feel the bash
syntax isn't "modern enough"?

What would you propose for backwards compatibility, and what is the
likelihood people will actually use a different syntax to do the same
thing, which only works on very new systems? What about POSIX sh scripts?

This seems like a fairly big proposal for something I'm not even seeing
a definite argument as being actually wrong.

-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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