zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Variant syntax (Re: Could someone clarify how math functions work?)
Date: Sat, 20 Dec 2014 14:09:20 -0800	[thread overview]
Message-ID: <141220140920.ZM31351@torch.brasslantern.com> (raw)
In-Reply-To: <5495DDA4.4000604@eastlink.ca>

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.


  reply	other threads:[~2014-12-20 22:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <54939F50.50102@gmx.com>
     [not found] ` <20141219093551.5a89e4d9@pwslap01u.europe.root.pri>
2014-12-20 19:37   ` Could someone clarify how math functions work? Bart Schaefer
2014-12-20 20:35     ` Ray Andrews
2014-12-20 22:09       ` Bart Schaefer [this message]
2014-12-20 22:56         ` Variant syntax (Re: Could someone clarify how math functions work?) Ray Andrews

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=141220140920.ZM31351@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).