From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21084 invoked by alias); 20 Dec 2014 22:09:02 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34024 Received: (qmail 14986 invoked from network); 20 Dec 2014 22:08:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=b6gFOWC0 c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=A92cGCtB03wA:10 a=l1LfGIGTqgp3IhlqRWIA:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <141220140920.ZM31351@torch.brasslantern.com> Date: Sat, 20 Dec 2014 14:09:20 -0800 In-reply-to: <5495DDA4.4000604@eastlink.ca> Comments: In reply to Ray Andrews "Re: Could someone clarify how math functions work?" (Dec 20, 12:35pm) References: <54939F50.50102@gmx.com> <20141219093551.5a89e4d9@pwslap01u.europe.root.pri> <141220113708.ZM31285@torch.brasslantern.com> <5495DDA4.4000604@eastlink.ca> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Variant syntax (Re: Could someone clarify how math functions work?) MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Dec 20, 12:35pm, Ray Andrews wrote: } } OTOH why is variant syntax there at all? As I said, much of it isn't really "variant." It is standard syntax which has its uses in common cases. There are just some productions of the grammar that produce seldom-used combinations. Just as you can write a magnificently obfuscated expression in C. Or in Python, for that matter, despite their claim of virtue. And even what is "variant" is only "varied from traditional Bourne shell." In the same way that C has "lint" to report questionable but valid programming constructions, it may be worthwhile to be able to identify uncommon usages of shell grammar. (Or not, since we seem to have got along without for a quite some time, but worth discussing.) } What does it accomplish *but* the confusion of the user? The original intentions were: 1. A person familiar with csh but unfamiliar with Bourne shell can begin using zsh and feel at home. 2. An experienced user can write very brief but powerful expressions when interacting at the command line. Reduces typing time/effort. 3. The expressiveness and syntax of the Bourne shell is available if you need it (and is encouraged for scripting, where brevity is not a benefit). Note that "a person not familiar with shells at all can use this as an introduction to *nix" is NOT on that list. Later, 4. It's possible to do most kinds of text processing inside the shell, without having to fork off sed/grep/cut/paste/uniq/tee/col/wc/etc. 5. The shell can be extended with pluggable modules. } Supposing that the goal was to rid the shell of pointless obscurities "Pointless" is entirely subjective. That was tried with zsh 2.5, which eventually was put out of its misery (2.6 was based on the 2.4 code, with the retention of a few odd bits like options with the word "JUNKIE" in the name and BARE_GLOB_QUAL). Anyway, if you want that, there are a whole lot of other shells floating around ("rc" being just one example) that started from scratch with that goal.