Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16025

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

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Eli Schwartz <eschwartz@archlinux.org>
Newsgroups gnu.bash.bug
Subject Re: Are there any plans for more readable, modern syntaxes for If statements?
Date Thu, 12 Mar 2020 17:00:49 -0400
Lines 82
Approved bug-bash@gnu.org
Message-ID <mailman.2547.1584046869.2412.bug-bash@gnu.org> (permalink)
References <CAB+qc9AAPQbzp92tv-FOR4Kh+2UdZyRwGiPOfNegVqv5UFnU5Q@mail.gmail.com> <f1d0d39d-b6e6-c33e-7463-226f6994b99e@archlinux.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="e58hja2OHOzjEF8VR31xLSx7uJlfadp9j"
X-Trace usenet.stanford.edu 1584046870 20057 209.51.188.17 (12 Mar 2020 21:01:10 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-bash@gnu.org
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=orion; t=1584046852; bh=lpWVYVutKWKvD7LMH6Ct0gwK1wkE5f+G5JvQOvKQbpI=; h=Subject:To:References:From:Date:In-Reply-To; b=B1Cxv4sVC95qm5s7Bs+CRZOow3N07XJ2Ayd7SAd8k7zfmvW9K7kEa2n3Op/11IyGC SXFnO0mmnvsVNQeFTo/0IHr+1WbtY1dNVe5ysmK/ULgaQUDH+udKKd8c9kNBLjwCUA OxwQCvSUl/9veXlMVSaH8eE7NI16Y4NovxCeGBOuj3MeZ44WhWwDfY3WAJSWGCFvP4 qJ9Z7MjYHCEr9XxQTfcEc+HFvrcUcIQYADvTIrPU1lJI9dcx3RJOlLrbRld6d94GpG u2wvWVxm9IAg8xqQ3AiT2HVFl78kwG/y3WVm3afPxiBZGvP+kEqLesQG02hhgL0obK IlWtjdlB6PJ1/hf5hccaCBMhQrZqNrJ+6tD/iaTaPjcM/q/K4qmxX+9gceDcps2e7Q u4lNs9arHDbgliXBe9ksUwd4rpW6qMywQrO5c39nKo1jA0qM5B6PCafW3U6EvzpGTG oC8fRzkXq5dYsxtSKX6hNVwzY8cdJY2Mx1ROJphAoV9rALfezsYdzQ/Zz8dXMscItu PI7T3RttOlV8JT+jxgJ9/rvFaKnFvZH856/4vLcSUYGo9JRRRtbE89QxxPUfHdFvLd bWL6O7+w9vgwsopO27oynU9aHavwbzNk7z6x0K7QZzdJstQ936Gop8PXyeYliAQjYy qm3KIFPgJMTplwnEdF5Guuo4=
X-Clacks-Overhead GNU Terry Pratchett
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0
In-Reply-To <CAB+qc9AAPQbzp92tv-FOR4Kh+2UdZyRwGiPOfNegVqv5UFnU5Q@mail.gmail.com>
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy]
X-Received-From 88.198.91.70
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <f1d0d39d-b6e6-c33e-7463-226f6994b99e@archlinux.org>
X-Mailman-Original-References <CAB+qc9AAPQbzp92tv-FOR4Kh+2UdZyRwGiPOfNegVqv5UFnU5Q@mail.gmail.com>
Xref csiph.com gnu.bash.bug:16025

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Are there any plans for more readable, modern syntaxes for If statements? Eli Schwartz <eschwartz@archlinux.org> - 2020-03-12 17:00 -0400

csiph-web