Are there any plans for more readable, modern syntaxes for If statements?

2020-03-12 Thread Vaidas BoQsc
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?


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

2020-03-12 Thread John McKown
On Thu, Mar 12, 2020 at 3:07 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?
>

I think this would need to go to the bash-dev list. Have you tried tcsh? I
understand it tries to be C like.



-- 
People in sleeping bags are the soft tacos of the bear world.
Maranatha! <><
John McKown


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

2020-03-12 Thread Vaidas BoQsc
No, I haven't. I looked at the various documentations of tcsh and couldn't
see any real improvements in syntax from a standard bash.
I can't even see a reason to use tcsh instead of bash, as an average of
bash. Syntaxes are the same or almost the same and horrible to read.

2020-03-12, kt, 22:21 John McKown  rašė:

>
>
> On Thu, Mar 12, 2020 at 3:07 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?
>>
>
> I think this would need to go to the bash-dev list. Have you tried tcsh? I
> understand it tries to be C like.
>
>
>
> --
> People in sleeping bags are the soft tacos of the bear world.
> Maranatha! <><
> John McKown
>


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

2020-03-12 Thread Eli Schwartz
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



signature.asc
Description: OpenPGP digital signature