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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15224 invoked from network); 3 Jan 2021 18:27:16 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 3 Jan 2021 18:27:16 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1609698436; b=X0ZOULoBii8I2AtSsp6RDfOcMMnWZD1H0DiMwYW9gmHojDVyqX7vjoe7DeR+cZ7bgTgm74b3/7 Y9u0woVwMgr1F3MQNBIpTkLU1WGPndh7Y39ikdk2spsl6rb0mpetRPyhlIM1/2jS2k0GGPmTjC 4TlNBj1crHN1BqF+ByAAUe0+DHgYvLu6Qq2TCbXCUpwXORL9alh7G/QPF+v3vnMRUjfH7yIhhA kVLmeWy9FPeJRmEhNtA2Mwo7ukvfww03YRSlFhp0L1blAunKbJ+WQVbbr9KaCgGN6RMUXf600N vKT9gXRXCQzbDaaiIAXneSiti+SXjd0cNffSNAQnJiMAwA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f178.google.com) smtp.remote-ip=209.85.167.178; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 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-20200801; t=1609698436; bh=XGuEVg9xERcOQaG5wfBh1sFI/gJSRybFd+fFK2kfLOU=; 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=KtpgwwTbdvIvnPny8vWDbjKVAezqxT/3bEVCYbvACk6FuTlBtTauV00gb1MUeKhsFYYQZ6386Z 8N9v6IqXiNplm5zhXiz1yav2vuvjC/uy2JAgYSkuopNXs42Ee3cPHWtukwTfHfivSQfxfuHXTV 99ZWCo/cFkVpNM1Kq+RiuxuCXtEyNTylxlWemwT57Uo94FdXRy2sR9Bpxs+U3owTzeoyfcHKZf H4rP/DEsnmBMOdwDaEg/WHdvK/Vwy+29cz1lg6RROmsIYnd+wC9OhFOelYrqKZwLUGZhN5g3+C r3s+YUDE+ji32DT2hQA/0UtCBvEV9yhje4apbV2jMLoCPA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; 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=CJE64gwzF9qdyoJjHtwOr6sdSFwMQpNFhe5vWYBSdCk=; b=aODhgaLCkAXYo8vvEMbM45N2ep A7Gh98Qb2+l9DS9X91Yk2tAMZ5h4aVrYP266DJ/G5lM2rddGUCus1yadwCGhh5kdn6Lr9g62+HyCo gMoqHT40aeFvSdPoh71pivcao1syELAsG+Roay4Pxm5iek2rFLvLJjk/yYHVK2+oqoJzhIb8Gy/dB 84/9nuaGPRnSKYPyou42OcuaABSORiwH4R4nB3kGevgXilRVRbjkc2PDOSC/iexgZvexBMe3p6Y8G YXOAPR42Zm/L5H7vZ8+yjUZG+7QooLO4VvlWc9IY7cMyNCto/Bqh1NtNYYKDickNSi9HTP9p7Yvce 91YQSDGg==; Received: from authenticated user by zero.zsh.org with local id 1kw85y-000CW4-Pl; Sun, 03 Jan 2021 18:27:14 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f178.google.com) smtp.remote-ip=209.85.167.178; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-oi1-f178.google.com ([209.85.167.178]:41213) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kw85l-000COl-8M; Sun, 03 Jan 2021 18:27:02 +0000 Received: by mail-oi1-f178.google.com with SMTP id 15so29665418oix.8 for ; Sun, 03 Jan 2021 10:27:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CJE64gwzF9qdyoJjHtwOr6sdSFwMQpNFhe5vWYBSdCk=; b=rcex3kF0zF7jAoetN+hQkXdGCslA530uvDPEbGiumusILNz9SvUod4EAHbarktq+S6 xUxvNCtEcHb+n9JlNPbFef6RqpsiAXZurGiUZcIcvCBX51g0w7emyo8RGpJqHcRR6X6r 0beenxD8mOv0K9ud7NjILXw1dvq9zdOPRYLA+6XNTVQSBJBSvDuNYszj0I+3jrf5J2A7 MHULPK1MxB/DKpJg1twAD1ZC7nzmIQIhw5HZazpS1TESNAT//UE3j33O4qBUZBtA7zdA 7odPkt2m9VfddR2GvLU2MqiNYhOpY4/IsL7zRVmtsPekDBm+jw6D92a0QXWqwGtZq2NH /bbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CJE64gwzF9qdyoJjHtwOr6sdSFwMQpNFhe5vWYBSdCk=; b=fY/sy9+sPClf1gcsG0lffrv3ER3zqjXTlnxHvuqdojNKErwTaj3dLPUBk2GvhOKS4d ZF7xLUJ8mK4YmCnn4cc3KujuiKs9YirpXbdVj+HMhUozmY/Lx7JpIi6yBtWRrh7r3mO3 4VMk+kv4A4fYy+45+cmrSgXTDAzwKZfL2AOJIE8I0R3+4Q0TzmFz0AbpeTf7aoCIJ8do D2nu89B1nRypDrSpkvplUPVDNoy3X6ZRJF5Ek92T4l0aoYu0isgtFFj8fHOf85bTyRZP 6imtEDOI6YYXR6q1OO4BxBzFrlBBLBHIN3nkSJiCaFzIafGHoegLpAuFhdU+UOqz+YtA aOxA== X-Gm-Message-State: AOAM532/EVLTgClI2VkiVeSgtmNZg+/gppmSFsPOGOo0SCNnU3zgcdE5 CWpYHF1i0qK9Uz+JQuCK2Rh1E+Uu5qVvb0r81CtmFQ== X-Google-Smtp-Source: ABdhPJyuPQ5gzuH+LrEOt3nbXFS/7fpgzemXbgDTQM+Sn64vtn17TDBKLYPXLB6BFIgmRe1cLOXvqzMHVljMJvZZW1M= X-Received: by 2002:aca:75cc:: with SMTP id q195mr16236498oic.173.1609698420163; Sun, 03 Jan 2021 10:27:00 -0800 (PST) MIME-Version: 1.0 References: <20201228221342.136199-1-felipe.contreras@gmail.com> In-Reply-To: From: Bart Schaefer Date: Sun, 3 Jan 2021 10:26:48 -0800 Message-ID: Subject: Re: [PATCH] declarednull: rename DECLARED to NULL To: Felipe Contreras Cc: "zsh-workers@zsh.org" Content-Type: text/plain; charset="UTF-8" X-Seq: 47792 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: Archived-At: On Sat, Jan 2, 2021 at 6:38 PM Felipe Contreras wrote: > > On Sat, Jan 2, 2021 at 7:18 PM Bart Schaefer wrote: > > > > if we go all the way back to the original > > discussion about this, the point was that > > > > typeset var > > print ${var-unset} > > > > should output "unset". Correct? > > Yes, but that's only *one* of the considerations. It's still not > perfectly clear what "typeset -p var" should output. Hmm, sorry, I thought that was a solved problem. Except for some special cases like "readonly var", I thought it was pretty clear that "typeset -p var" should output a semantically identical command to that which declared the variable in the first place. (Assuming POSIX_BUILTINS, of course.) > > unset var <- DEFAULT(off), UNSET(on) <- NULL(off) > > Nope. The value hasn't changed, it still has the "default" value. "Default" here does not refer to the value (or at least, not to the value alone). A different example might be more obvious; if I do integer var unset var then "var" is no longer an integer. That is the default that has changed. > I think this is playing ring-around-the-rosy; you are trying to find a > word that signifies that no value has been assigned, even if the > variable is "set" No, that's not it. I'm trying to find a word that describes the STATE of the variable, independent of its value. It happens that the "spec" that we're importing from posix-ish shells means that this particular state is always paired with the state of "unset-ness" but regardless of your arguments of functional equivalence, neither of these states is an actual value of NULL. > So It seems your code and my code agree with the behavior of both A > and B. The only unknown is what A and B mean. > > Agreed? Yes, although I would not say "unknown". More like "unnamed". Also, your script doesn't observe that "current zsh: B(on)" does not mean the same thing that "patched zsh: B(on)" means (at least for my patch and I think for yours).