zsh-workers
 help / color / mirror / code / Atom feed
* zsh-workers 43616, typeset doesn't report tied parameters
@ 2018-10-08 22:54 TS
  2018-10-09  7:31 ` Stephane Chazelas
  0 siblings, 1 reply; 5+ messages in thread
From: TS @ 2018-10-08 22:54 UTC (permalink / raw)
  To: Zsh workers

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-10-09  8:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-08 22:54 zsh-workers 43616, typeset doesn't report tied parameters TS
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

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).