zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: <zsh-workers@zsh.org>
Subject: Re: Could someone clarify how math functions work?
Date: Sat, 20 Dec 2014 11:37:08 -0800	[thread overview]
Message-ID: <141220113708.ZM31285@torch.brasslantern.com> (raw)
In-Reply-To: <20141219093551.5a89e4d9@pwslap01u.europe.root.pri>

[> workers]

On Dec 19,  9:35am, Peter Stephenson wrote:
}
} I'm wondering, however, if we can do a bit better by strengthening the
} warnings against variant syntax --- whose sole role appears to be to
} confuse the user --- and provide some kind of good practice guide for
} complex syntax such as functions, loops, etc.  But would anyone read it?

Grammatically, "subshell() ( ... )" is not "variant syntax" it's just an
uncommon usage of the standard syntax.  SHORT_LOOPS on the other hand ...

Either way, we could introduce an option similar to WARN_CREATE_GLOBAL
that prints runtime (parse time? "verbose" output time?) warnings for
some of these things.  It'd take a bit of work to track down all the
cases we might want to warn about.

Then one could e.g.
	zsh -o warn_odd_syntax -n scriptfile

We'd have to decide whether multios are in this category, etc.  There is
no clear line between zsh-specific syntax that one might use intentionally
and "variant" syntax that one might use accidentally.  And subshells are
even more a case of "did-he-mean-that?" when used where a current-shell
construct in braces would be more common.


       reply	other threads:[~2014-12-20 19:36 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   ` Bart Schaefer [this message]
2014-12-20 20:35     ` Ray Andrews
2014-12-20 22:09       ` Variant syntax (Re: Could someone clarify how math functions work?) Bart Schaefer
2014-12-20 22:56         ` 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=141220113708.ZM31285@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).