zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: More warn_create_global warnings
Date: Wed, 30 Dec 2015 18:17:10 +0000	[thread overview]
Message-ID: <6d067a9e-749b-4edb-959e-d182b70d8c05@email.android.com> (raw)
In-Reply-To: <87mvss6mru.fsf@ft.bewatermyfriend.org>

[still on my phone with limited bandwidth...] 

> Do I have to mark those local before using back tracking?

Yes, if you don't want a warning. 

>Or could those 
> maybe be created in local scope unless they already exist? 

We don't know what scope you need them in.  You might have a utility
function in a script that needs to pass them back. It would be extremely
annoying to have to unpick this when the lack of a local wasn't actually
a problem.

Automatically set variables like these are particularly susceptible to causing
problems if you don't get the local in the right place.  That's because
they can be used at multiple levels in various different ways.

By contrast, variable names you pick yourself are less likely to cause
problems.

So if you don't want a warning here, it could be a sign you don’t really
need the warnings at all.

pws

  reply	other threads:[~2015-12-30 18:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-30 14:20 Frank Terbeck
2015-12-30 18:17 ` Peter Stephenson [this message]
2015-12-31  1:06   ` Bart Schaefer
2015-12-31  0:49 ` Daniel Shahaf
2015-12-31  1:27   ` Bart Schaefer

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=6d067a9e-749b-4edb-959e-d182b70d8c05@email.android.com \
    --to=p.w.stephenson@ntlworld.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).