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,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25749 invoked from network); 17 Dec 2022 12:49:23 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 Dec 2022 12:49:23 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1671281363; b=Z8xDrnreymXV9bR/h2KQ0R2PW5DoLwjvulvrVCn2nhpuNTnuA/ky39EsubLutniw/IPVsQtVSM r5fYoc/5Ct06INpnf2eMZ4sOn9330n1HY9fgs7A7CbQcQMIKxocozzVPjkQEJLh//q98EcAbp6 cIgSFEyy26bqW5+xj6ceCHGCEhRHrns80dw10pIxcFrlRwyXAsHM0l0uh12zizBd+cmeHy1xpS n0cZqO8oDThR91bii0eg962N7xiTSRvyCC6YF+Jh6T83UlnV7SoK6ze5pYTzuW30rJ5yGxCuUm D1obMkkHO5tyHpG4hGtQyvvPkvbdiZyS203IDKR8d7QaIw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f43.google.com) smtp.remote-ip=209.85.218.43; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1671281363; bh=mhE4jBGIebwpAYMqJ4PVnBZr/tF8hqKttIBRMg/vQhY=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=LFpSvKdSZ65YxFhIj8aTW4Hy5B202NeF/RpqxBM7Cv6s1fen+KyACpWOe0m7yn9bH6UqTASEip 3YtPJJNH64Vx1c8+cPInYRXGy9y4LAFhQrmmkBZlHDxxDzjVuKaDltOukfgWWYwXU6u8QSE4v0 wSPq4WVyKeuejp5rsCF4A5YG/KP5CLuLQHTf2oYkya+gZ6i+LWpZR7/tSqsunnLKCov9xoWtNh ZUUJMEAnKbnnfPvzAZ+EH91nndfwcNxxNKEtv+R/tGjkijRMvWQxaOdyf+U4D9kWAPPIYxt8ff D0/FbgKFsl6JGn+r/Kqv51CUqCN+K2U5/TZxL4D1OsaFnA==; 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-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=vbgM0R36IMlNVJoGFwGIOMwUY21/L7tg7zKAmMbTys0=; b=qwyu5FNEXXfDApDw1mu2fYfNP5 B8qdvBtTaFt15lesGE5ATU/RvmU+rqylWGYojPo9oLTnSzVqGibs3LMqJS3PrEKdoT1E++SaTrrWp L31w5S68Sm6iQAOuGpIXp1Z+HrssbgPkitAnzxyRf6x7yD/hbYE1lsEKNf4GaUjU0GPvlzzi8bSfT ppNw2jPhuK59T2A8jY5NJxdQMm1HCsQiIjpiY9DIMw8em1XZKhIVdJ73T+fIbTNZK8eMt9cUSdmTy IfWfBSnB6slQJrBFk6qQSQMAF1dzmSA8i2+JIlSQP5YZfJJcLPARc/gx5B6cHrbJhdZ/xdTDc/Tcj BrJO4rYQ==; Received: by zero.zsh.org with local id 1p6Wcz-000AcS-Ee; Sat, 17 Dec 2022 12:49:21 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f43.google.com) smtp.remote-ip=209.85.218.43; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ej1-f43.google.com ([209.85.218.43]:37674) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1p6Wc6-0009ug-5H; Sat, 17 Dec 2022 12:48:26 +0000 Received: by mail-ej1-f43.google.com with SMTP id ud5so12007538ejc.4 for ; Sat, 17 Dec 2022 04:48:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vbgM0R36IMlNVJoGFwGIOMwUY21/L7tg7zKAmMbTys0=; b=mRgMOCMe/sIMAsSa2YOrLthwKvFXpUSnYEbThjwYVxaeH0MPK+NCkX1DN0D29hDr18 JcE3OEbOLh8EV2qfUVqFQ6HhFlSYdJMUQgDP8dutyHDq37EZRj36XBtQi+bo6HEtF8wE r1M8A/uXgINskg8abZETW6zPY02m8njvxboFZl2uyesFIEwEs07pvo3bO4oR2QKB6jzy mYCITExIS8pcE4j4XbANap4n3ZLK+KJCrRP3NxCkzcVZ0doTLJLdQDM8YXkyy3ZUswhu jO24YhJDBnbhpEYiV7SpbVGjPtJPUddWbDRKjo57lXmRXRxqSClT5sfN5RkKiIgQ4XJX LbzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=vbgM0R36IMlNVJoGFwGIOMwUY21/L7tg7zKAmMbTys0=; b=ypLVMpacJmES4TaCiunkx1hQbVL+5Rqr14BTF4IGkP7B/xYZN9hzGUOS2q9s8y5hH9 hi40Ea81W43WEWCH+c/ubWOXg/8p33Bz3uiGN8qfGETO8ZmdfU0bHq07rZjuZr0LS9vw 7eLC0e7dnAgRNxQjyo4dKYYDlzq+MPiijQ+Wu3EZsBwwEWOfsqchXPG2MScQK/Y8EzZ3 Yfes8yqZX1WYPjO4NHVW0AKeRJebPSEEpwpsmUoe/3ocwZexwP1NOgafoKsHtm2CbsrB /MbfHe+qlUV6+VASvpd7U23Z9D6K1uM6ptOfr0PS3RBZw47lZ6jdshis4/SSf79ChS/L aLQA== X-Gm-Message-State: ANoB5pkfmO+uMkhHTkoUHP08UmzUbB4Kbvt9IVllcMqe4nGBiB2aD8UY /Ostmh0eUCbGzzK+yRPlxnjGAIKy/rkJMchr4sfwHLU3APA= X-Google-Smtp-Source: AA0mqf67Jz174jeCwu4JziQs9TPCqpBj5i4yfRIU5/MtwGAx7uV6gzSYDsAIu4BtMTp+2PpXFmMC7eNSMDYyZpVUkcg= X-Received: by 2002:a17:906:c44a:b0:7c0:d6bb:fd7 with SMTP id ck10-20020a170906c44a00b007c0d6bb0fd7mr20803410ejb.726.1671281305520; Sat, 17 Dec 2022 04:48:25 -0800 (PST) MIME-Version: 1.0 References: <46161d8a-c177-4134-836e-592e5c048887@app.fastmail.com> <902fb047-3435-89a3-e7ea-74e74075c2c6@eastlink.ca> <09d09690-08c8-4499-9011-9c45d7676f52@app.fastmail.com> <81952d4b-3ead-f912-f987-fe9a37dbd256@eastlink.ca> In-Reply-To: From: Pier Paolo Grassi Date: Sat, 17 Dec 2022 13:47:49 +0100 Message-ID: Subject: Re: uninvited members of associative array To: Ray Andrews Cc: zsh-users@zsh.org Content-Type: multipart/alternative; boundary="000000000000890fc705f00580cb" X-Seq: 28573 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: --000000000000890fc705f00580cb Content-Type: text/plain; charset="UTF-8" it certainly is to be said that, even if the shell implements all the basic programming constructs, it is meant for different objectives then those that are targeted by the things one most commonly calls "programming languages", and even among those there are many distinctions, so probably it wouldn't be so easy to establish an exact definition that includes only the "ideals" (whatever that means) programming languages and leaves everything else out. That being said, I think that one should accept the language for what it is and what is meant to be and do, and even if something would be awesome if it was engineered with hindsight (like array expansion without empty string elision with a more same syntax, or by default) it should be wise to understand what the language is or is not before dipping too much one's arms and feets in it, reading the manual at least a couple of times front to bottom, since someone has put the effort to write it. At least I try to do it this way, I experiment a bit but then I try to read everything I can before resorting to ask for help, it seems only fair given that someone has to put aside whatever he is doing to answer me. Pier Paolo Grassi Il giorno sab 17 dic 2022 alle ore 00:33 Ray Andrews ha scritto: > > On 2022-12-16 14:15, Bart Schaefer wrote: > > > > I'd appreciate a pointer to that definition, since apparently my PhD > > in Computer Science is from too long ago to have covered it. > > Ha! Sometimes hairs need to be split, and Dominik is surely correct > that zsh and say C are very different, but to say that zsh isn't a > programing language will be a chore to sustain. > > Daniel: > > > You mean that you wrote foo[bar] and didn't realize that was > > a globbing syntax too? zsh can't disable features because you don't > > know them. > > This stuff is all so fundamental that it couldn't change even if > everyone wanted it to. Disable isn't the word I chose. But there is > something very unfriendly about situations where you're doing something > with an array index -- and it obvious at least to oneself that this is a > string thing, and then zsh zealously applies filename expansions to it > when it has nothing whatsoever to do with files. I don't mind being > clobbered, that's part of learning the shell, still it isn't very > intuitive. Anyway I've learned the protections. But one can want to > do some string globbing and still hope not to have anything to do with > filenames. > > > > --000000000000890fc705f00580cb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
it certainly is to be said that, even if the shell impleme= nts all the basic programming constructs, it is meant for different objecti= ves=C2=A0then those that are targeted by the things=C2=A0one most commonly = calls "programming languages", and even among those there are man= y distinctions, so probably it wouldn't be so easy to establish an exac= t definition that includes only the "ideals" (whatever that means= ) programming languages and leaves everything=C2=A0else out. That being sai= d, I think that one should accept the language for what=C2=A0it is and what= is meant to be and do, and even if something would be awesome if it was en= gineered with=C2=A0 hindsight (like array expansion without empty string elision with a more sa= me syntax, or by default)=C2=A0it should be wise to understand what the lan= guage is or is not before dipping too much one's arms and feets in it, = reading the manual at least a couple of times front to bottom, since someon= e has put the effort to write it. At least I try to do it this way, I exper= iment a bit but then I try to read everything I can before resorting to ask= for help,=C2=A0it seems only fair given that someone has to put aside what= ever he=C2=A0is doing to answer me.

Pier Paolo = Grassi


Il giorno sab= 17 dic 2022 alle ore 00:33 Ray Andrews <rayandrews@eastlink.ca> ha scritto:

On 2022-12-16 14:15, Bart Schaefer wrote:
>
> I'd appreciate a pointer to that definition, since apparently my P= hD
> in Computer Science is from too long ago to have covered it.

Ha!=C2=A0 Sometimes hairs need to be split, and Dominik is surely correct <= br> that zsh and say C are very different, but to say that zsh isn't a
programing language will be a chore to sustain.

Daniel:

> You mean that you wrote foo[bar] and didn't realize that was
> a globbing syntax too?=C2=A0 zsh can't disable features because yo= u don't
> know them.

This stuff is all so fundamental that it couldn't change even if
everyone wanted it to.=C2=A0 Disable isn't the word I chose.=C2=A0 But = there is
something very unfriendly about situations where you're doing something=
with an array index -- and it obvious at least to oneself that this is a string thing, and then zsh zealously applies filename expansions to it
when it has nothing whatsoever to do with files.=C2=A0 I don't mind bei= ng
clobbered, that's part of learning the shell, still it isn't very <= br> intuitive.=C2=A0 Anyway I've learned the protections.=C2=A0=C2=A0 But o= ne can want to
do some string globbing and still hope not to have anything to do with
filenames.



--000000000000890fc705f00580cb--