zsh-workers
 help / color / mirror / code / Atom feed
From: Stephane Chazelas <stephane.chazelas@gmail.com>
To: TS <debts@xk2c.de>
Cc: Zsh workers <zsh-workers@zsh.org>
Subject: Re: zsh-workers 43616, typeset doesn't report tied parameters
Date: Tue, 9 Oct 2018 08:31:38 +0100	[thread overview]
Message-ID: <20181009073138.c6uxzj6uljevwqcx@chaz.gmail.com> (raw)
In-Reply-To: <f181228f-ebf8-26bd-7c3a-578d29d4689a@xk2c.de>

2018-10-09 00:54:16 +0200, TS:
[...]
> IMHO when a readonly is tied, the newly tied var (either scalar or array what
> ever comes last) should take over the content AND the readonly flag in one go.
> OR a readonly should not be tieable at all.
[...]

I kind of agree. On the other hand, attributes are not mirrored
between pairs of tied parameters  (anyway, most attributes only
apply to scalars and not arrays).

One could imagine someone wanting to make only the array or only
the scalar readonly to force modification using the other one.

readonly is kind of a programming aid (reminder that the
parameter  should be constant). Tied parameters are really
designed for the LD_LIBRARY_PATH, INFOPATH... They are
different concepts that would generally not be used together I
would say.

One can always make both INFOPATH and infopath readonly if they
don't want it to be modified.

-- 
Stephane

  reply	other threads:[~2018-10-09  7:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-08 22:54 TS
2018-10-09  7:31 ` Stephane Chazelas [this message]
2018-10-09  8:00   ` TS
2018-10-09  8:27     ` Stephane Chazelas
2018-10-09  8:58       ` TS

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=20181009073138.c6uxzj6uljevwqcx@chaz.gmail.com \
    --to=stephane.chazelas@gmail.com \
    --cc=debts@xk2c.de \
    --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).