zsh-workers
 help / color / mirror / code / Atom feed
From: TS <debts@xk2c.de>
To: Zsh workers <zsh-workers@zsh.org>
Subject: zsh-workers 43616, typeset doesn't report tied parameters
Date: Tue, 9 Oct 2018 00:54:16 +0200	[thread overview]
Message-ID: <f181228f-ebf8-26bd-7c3a-578d29d4689a@xk2c.de> (raw)

Hello Stephane,
Hello folks,


regarding patch 43616 i would like to ask the following.
cites from patch:

1)
+When an existing scalar is tied to a new array, the value of the scalar
+is preserved but no attribute other than export will be preserved.

2)
+ More generally, the readonly attribute should not be relied on as a security
+ mechanism.

3)
+ Special variables that have been made readonly retain their value
+and readonly attribute when made local.


IMHO 1+2 are inconsistent with 3.
What 1 means is, if a readonly scalar is tied to an array. the content of the
scalar is changeable through the array interface.
At least in 5.6.2 that works that way, so this is not new.

Not sure if that is the best way to handle that situation.
In other shells AFAIK a readonly is unchangeable.

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.

Leaving it the way as currently is inconsistent IMHO.


kind regards,

     Thilo





             reply	other threads:[~2018-10-08 22:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-08 22:54 TS [this message]
2018-10-09  7:31 ` Stephane Chazelas
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=f181228f-ebf8-26bd-7c3a-578d29d4689a@xk2c.de \
    --to=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).