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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2518 invoked from network); 25 May 2023 22:10:06 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 25 May 2023 22:10:06 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1685052606; b=F90XCWWywbotVbs59/dIDyImfKK1I3ehBsmQ1oIQK2WMuE9zioy9Xc7y16IZw8ci6dkA++y3Sy oWh3WGl84mpjNvK3mT9LNLWRVez6vj9VCJvz02P4fG45VvRzxn+WJpjtEQlix543NANTfjq8DF GUHxtjTXZEzPobs38pHqwr/R9GLoeyuFPQXH3fAL6KWn38WhTCweSdpTGJSfVuq+LMhSyXcW3h qtnhHof1G/ZP5svVfFq+lwtlYgf1XuRmXonqllQxDHfaRC/cyc23my6FN4K7WIVISqn/UclppA I6IIWqm/wgHR2Bgur/RFjFObmEMq+55Y2NZA4zewElYpHg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f54.google.com) smtp.remote-ip=209.85.218.54; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1685052606; bh=WsaAdJChySMyjhkPrWC6ccRZLPqml2EDHWvFHh4xBtM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=PyvKpu43IVOvtLRQuR4u/ypGSGuU9tyLfiRPHfZwlaIr/rBaIN85DszMRCgGyrvMxfvv8R27S5 czE/XMkNOdGn7hhKG5Yc9rS6Bn8L4dQJt+O1deNbWLwD6fAJ9v4lPqkHU+jAxzpFeBgqgxEnnU EJSI6JNkUZ6QTOz7yJfmns93hbIM5WLBETaCU3/YeHK272t6RlV4KDyv+satNYKvC2K5Z55ytJ iKAxai4gachXal4NI8qRT0jaATOgmHNqe4QE5JpZVrGqXmv3Y8kidI6F+tpjXG5Fwb1GV8zz/1 NxYdQiyHgqMgeuB5NAQjgyV7j/coWEiJKbe1zpAhwiRauQ==; 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:Content-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=k2WrD9aCmPjBcp90KXNrs5vnmaf1rg9Ac5Wwznry3B0=; b=pvfjk6QQaunzTE6FGyIxh75HA7 jtC5NCzh4enTqFFtABwYKSwKddoChQEeOgFg6O/hUysGTOElXmTEKP4QYx+ITnPhbScw8bZRkEIiH R0+S77OMZFhel37Hm7t/eM69Bd9BwvyjvvDtcIQ5setNyeHSKIrxhO6QeIDQdDHdmAUTh2mSm4eux tCEd1qsF0JV0WAB6Uq728HwDFr17dFaOp9+XQfsxbMBq2ZfZW+fv6gztmf8JGiWLgYch3xU6KXZtq unAPkuv0LhfSM1UCZyk/WPLEOgigSN1lqADaW5fhuV2Tu23ckbNd4LEInkY7IdbzQD+giE6/GfCR5 h0tFRkbA==; Received: by zero.zsh.org with local id 1q2J9n-000Dqh-Ms; Thu, 25 May 2023 22:10:03 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f54.google.com) smtp.remote-ip=209.85.218.54; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f54.google.com ([209.85.218.54]:60445) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1q2J9T-000DWV-Ma; Thu, 25 May 2023 22:09:46 +0000 Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-96652cb7673so5469566b.0 for ; Thu, 25 May 2023 15:09:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20221208.gappssmtp.com; s=20221208; t=1685052583; x=1687644583; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=k2WrD9aCmPjBcp90KXNrs5vnmaf1rg9Ac5Wwznry3B0=; b=LL+49Nt3dx8OHwPiyevTmb3Wq9TYfkjACgRFdig5Is1UTvlEpppMnfFOVHWGWv8fzT QkGILNxyPFSTGKIzq9saiiz4hX6Hxv6WhqSLJXBNPKdK9fRzvuvs7c8T5ZXu2oNBGuu7 F0HoIiMWHR7yh7sX6pqPl+0/Nh/asjpY5+xNu96cqX4UEV9Pjm7/vbsHXU3Bfk16rZ3H 3wFcLX1EB6faTDiCSdygK6jSx4xI0hP4uVD9aS8Ajg1TyAkq409lPLTjrUO/4FiW75Rm KJhzkmeS86KRoDF2QQ66uGnxOtCbNPJTkG+QUsSyEz0cxwN6+M6QieTygYbuhz8OoPIm f+lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685052583; x=1687644583; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k2WrD9aCmPjBcp90KXNrs5vnmaf1rg9Ac5Wwznry3B0=; b=TQosVd3FnunaPQh/z8Y++NfDiRT4aem6kNoosDsc94S1LGWb7MBLiDMV+t61gXOuwj AUYu5024dByHDBP7mhrfI7Bo6zWiaeDT7rl34BgvdqiZhIttfxbe2nXiXC+aGRgI15FC Zt9rNbhq3bnnRURp5H7lvMv0KuB/ZLMMRI7Mfr0qtQH1v3RM61vR7OHXjF2Yy1boHqXv NWX/GMdxsieBRwlSuz9uzA1mn6nLZu6sPG4Z8lyKNaBzHP2s8ggaJbO2OsYm4TIhh0TL +01jympMMULaHEzqy/FhAJ9d65pOlSB+3y8cBP3/THq1eYjFXLfZK5C6qi0J0OTse8kX DEqQ== X-Gm-Message-State: AC+VfDzCn8E4sRcTfGPjj+C6i/YyEOGZrNua23NWl54auLTio13OoCxQ Tg07I4eNJK9KdEJzMnR++hlsRT+GUAVRWQQ699S3idEVQGafBFku X-Google-Smtp-Source: ACHHUZ4XIXKZyrb0/mjqMAlztKGi/2kH9IBvlXpHh3GMrmBsp6xeNGYExNV9n2EpCwdLhyVq8fzLy66sy0ie7Xtp8QQ= X-Received: by 2002:a17:907:c0a:b0:96f:d345:d104 with SMTP id ga10-20020a1709070c0a00b0096fd345d104mr251212ejc.38.1685052582920; Thu, 25 May 2023 15:09:42 -0700 (PDT) MIME-Version: 1.0 References: <9849-1684455235.063540@_q24.9gsR.Efjj> <92928-1684946470.047218@Qy70.4SHd.nnDI> In-Reply-To: <92928-1684946470.047218@Qy70.4SHd.nnDI> From: Bart Schaefer Date: Thu, 25 May 2023 15:09:31 -0700 Message-ID: Subject: Re: namespaces limitation To: Oliver Kiddle Cc: Zsh workers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51792 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: On Wed, May 24, 2023 at 9:41=E2=80=AFAM Oliver Kiddle wrote: > > One option might be to disallow bare namespaces, so > > integer .var=3D56 > > would be disallowed. I had it that way at one point and backed off because ksh allows it. > Where .3 just looks really wrong, .3.var feels > innocuous. Strictly speaking (to the extent that any of this is strict), namespaces are supposed to otherwise obey the rules for identifiers, which with the exception of positional parameters are not allowed to begin with a digit ... so I think I'll just go with that. I still haven't worked out how to deal correctly with .var.3x -- ksh allows .var.3 but rejects .var.3x so although it's a simple !idigit() test to disallow anything starting with a digit, it's more work to allow numbers but not strings that begin with a number. Currently that's handled in isident() at a point which precedes the check for presence of a namespace. Hrm. > Also questionable is the following which currently works: > > .a.=3Dddd > > The ksh error for this is 'no parent' That probably should be rejected, yeah. > We also currently allow a.=3Dddd but I think that is less > questionable. We allow empty association elements. I'm still not entirely sold on the x.y <=3D> x[y] mapping idea, but if we follow JavaScript's (somewhat questionable) lead on this, empty elements have to use bracket-notation rather than dot-notation.