From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25774 invoked from network); 24 May 2023 16:41:27 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 24 May 2023 16:41:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:cc:Reply-To: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=CYfRNlxOZq5jR2Ve7IZi8G8fxspCANuY57rvWSRhA1o=; b=G4xm64ScaK7sfCdvWe1FlMP0oS gMxVSx81gfLxUNRrf7wfnniI3tuucMWKg3fH1iB3ocWH5jBtyJ2Umlt7+WlGrC7XVegSExJds+Q/e oyIUoL+Gyjw7gL3Emz15Mww5B2f+ySMdXUEDxPQTSuTV3oMMqURrsQhWYGnSMQMhsAzAgUK7ox1Ds 1YMTqMUZaWpKwdyYPg+Ahlg6kBguKaolQlZOcKV4chLgPQZhVI2sFKV3/YqeYxoTWZTyLdyCMQvit R3eK3cAaw8+gnCMe4guUZK8/dj9UUc9ja85eztHMOytPr+VTG16pbKlS00Pil0CGHSWL4ULEVQshz a4lYzY8g==; Received: by zero.zsh.org with local id 1q1rYF-000FdB-2w; Wed, 24 May 2023 16:41:27 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1q1rXy-000FIw-KS; Wed, 24 May 2023 16:41:10 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.95) (envelope-from ) id 1q1rXy-000OAr-1g; Wed, 24 May 2023 18:41:10 +0200 cc: Zsh workers In-reply-to: From: Oliver Kiddle References: <9849-1684455235.063540@_q24.9gsR.Efjj> To: Bart Schaefer Subject: Re: namespaces limitation MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <92927.1684946470.1@hydra> Date: Wed, 24 May 2023 18:41:10 +0200 Message-ID: <92928-1684946470.047218@Qy70.4SHd.nnDI> X-Seq: 51782 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: Bart Schaefer wrote: > Yes, the first character of a namespace identifier should probably be > an alphabetic. Or an underscore? That might really complicate math > lexing, given that we allow underscores in numeric constants. What's allowed in math context can be (and already is) more restrictive that what it's possible to declare. One option might be to disallow bare namespaces, so integer .var=56 would be disallowed. Where .3 just looks really wrong, .3.var feels innocuous. In ksh93: $ .var=23 $ typeset -p .var .var=23 $ namespace var { val=78; } $ typeset -p .var namespace var { val=78 } Also questionable is the following which currently works: .a.=ddd The ksh error for this is 'no parent' even if you create an "a" namespace first. We also currently allow a.=ddd but I think that is less questionable. We allow empty association elements. Oliver