From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-return-43646-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id c2bd11da for ; Mon, 8 Oct 2018 22:54:42 +0000 (UTC) Received: (qmail 4162 invoked by alias); 8 Oct 2018 22:54:29 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43646 Received: (qmail 14694 invoked by uid 1010); 8 Oct 2018 22:54:29 -0000 X-Qmail-Scanner-Diagnostics: from www138.your-server.de by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(88.198.28.7):SA:0(-2.6/5.0):. Processed in 2.507403 secs); 08 Oct 2018 22:54:29 -0000 X-Envelope-From: debts@xk2c.de X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | To: Zsh workers From: TS Subject: zsh-workers 43616, typeset doesn't report tied parameters Message-ID: Date: Tue, 9 Oct 2018 00:54:16 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Authenticated-Sender: yup4hing8ed1teph9@Xk2c.de X-Virus-Scanned: Clear (ClamAV 0.100.1/25019/Mon Oct 8 22:53:15 2018) 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