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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31188 invoked from network); 7 Jan 2021 15:48:40 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Jan 2021 15:48:40 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1610034520; b=depD9nwFLjBEcc+DvfCPtWQ4J+v+0zOHwMmJmhwt8V2SiTa9LH/KRa5dUIg8W1WzcZwqugbovq c7gIAPjxnqdMhHAmQp4iMBUCxbHKFrqwnNAVs5nuBSSSR2pxOaZTBrnY50o4QZeH9+wGfpdWpe XAaatVFYpQ9jqhkoh5jAMxELJw7UA2ygLZblAKyeJQwe1cZF0I+dxrXNo5FjxIWZLpBqn7nQBN hNvSzUPjPoLco/6FDbJc8W95kSNP8KSxakt5wFKvZusfwYbHagqLg265ugcD/dxzmqKiW6OcAA ObkeMZsTWiwjD/piE4m3+5oFx/f/F/tIVTspKvGqJHEzNg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out2-smtp.messagingengine.com) smtp.remote-ip=66.111.4.26; dkim=pass header.d=daniel.shahaf.name header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1610034520; bh=Q152dvUBi8bnmbe1MhWy/9KP9E+E8PG1r5fgIz/bhaM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:To:From:Date:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=w5n4Q6ltMaPuBiNPRxkFJ+H+/4ZXqOT7ZGIfA942MtcWkQoDbYehqHn4QK56U6V46s7yWRWJ6y +v/yrGTKUq0+0PrMr7bRiqlHjG2czNXDk3vkM1bjsdRmgvMo+QGUwNbMXNNegoYsFSJaWvlXBo PFJ5w9hRHPg0qDn+sjF1muiiqmG+NCfaIksG8fO3NFHIAw3t+rl+rXwg1mc0Vh1UtWQNJRjEBt JVoCWXv05xX04zf/KZuhFm0kFW/uuQLnzmJy2PzSi+Pag07bHZ4iXAxgrDfRKkyB6Kl0xZdmNm x6763Um3uJygRvNpSG5hLPT9HkaQfFppBH2UKJ2ybhIAug==; 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:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=CfDNiTGQ38ukNKUVSEvAwk4Ifmu3YHT7JeTOT0gZwLE=; b=IibTL9seXVLitNkiYe6D7etgKl hTXUvTDcfPm+fvyeOpSq6o+pQK+iEeTpjhqGG93LUQ5ppnoU7VGFFOcpwCtJWTuwW8dXvtI3YAMPm EhH1vQMavM7nefHWrf4qlJeXP+CCr8UsF9Dyx0xO8Aap9pYveX/TyGM1gdi7IQ9kfECshZnqckTEq 2ihhZd83+MRlkr0Gmv6GNpspqt706hG8DZSYY1P0Rc+ADfC40z/aCVm28AfNA1Y0TfKLxRPrADvNq Sv5uE4/Tlw/q/3f03QWOJFcRdSMXvVx8nBFBn8my5NDdwyXihzSOX/hxvKyq9PsgBDMlLNxe+WyAX 5Vf3S1Vg==; Received: from authenticated user by zero.zsh.org with local id 1kxXWg-0009F6-KW; Thu, 07 Jan 2021 15:48:38 +0000 Authentication-Results: zsh.org; iprev=pass (out2-smtp.messagingengine.com) smtp.remote-ip=66.111.4.26; dkim=pass header.d=daniel.shahaf.name header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from out2-smtp.messagingengine.com ([66.111.4.26]:59147) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1kxXWP-00096k-RE; Thu, 07 Jan 2021 15:48:22 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 23AED5C01AF; Thu, 7 Jan 2021 10:48:21 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 07 Jan 2021 10:48:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:subject:message-id:references :mime-version:content-type:content-transfer-encoding :in-reply-to; s=fm2; bh=CfDNiTGQ38ukNKUVSEvAwk4Ifmu3YHT7JeTOT0gZ wLE=; b=aRMVYl0bm1gRWNzV7KifzHKWCAm8XcusGb0WrEOG8VtPyII2UvA9bLtD enUCHJDi3ofnNcVRg8Y7IJblCNpzMenbbQ6tn9iEfkPDsX1HOlNLmixixVmnL+4a dFxcftnNUturcVFxobFs9gZ/6Y2CjhxdQ0JhQRKuZBcXei4AXA0LfAz9/djJoAeh lg+531yZ6Wd9AYq/7D4tXnY6XSufegTIFrsUejnRI/aG1+QN+Ep4lucIr8DbJy+A wZr+AXscQQqhyxKk1kE6qY71SV1W4+pwYbM7PTKWNqL9sMiOv760W2qc7uB1FUIg /eMJyUzmngj+D2+Lo/kpgM6xL/a21Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=CfDNiTGQ38ukNKUVSEvAwk4Ifmu3YHT7JeTOT0gZw LE=; b=LP0PGQuY0SnUfiuBPOcw2mmN0UJr+gcwLUuQ/4Esg++m2BhqHJ1C7LnXz Z0TxfIMLdsjuEZ1cn6wDvBWHLckJPtBjd4iGcjjva7LFluHoZWelqQfCtUWDQsbM 1iYXeBQXudZUwSQizn6PYiqb5/DG3rSB9wF95w0s3DRx0A1vKIJiZp/ObaPDuv6j Z/+dKeQqshOoMzLJJaDdZ9VZLuaji5SWqsa0UD0o8Uv9BG5Gsmka2u7X0LgHC7pA jl7Vh0mMOotiuK93l7mDL8ytNsXSDeF+ykQ8Ofid8NJmDgcydTtxiKV4+/gH3xpY RHSN01kz35zQZLb0uxneLaE7tQRCw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdegvddgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggugfgjfgesth ektddttderjeenucfhrhhomhepffgrnhhivghlucfuhhgrhhgrfhcuoegurdhssegurghn ihgvlhdrshhhrghhrghfrdhnrghmvgeqnecuggftrfgrthhtvghrnhepgfekgfefjefgvd dvgfdutdelleekvdefteeitdduhfevveevudfhvdevfeefvdeunecukfhppeejledrudek vddrheeirdejgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvg X-ME-Proxy: Received: from tarpaulin.shahaf.local2 (bzq-79-182-56-74.red.bezeqint.net [79.182.56.74]) by mail.messagingengine.com (Postfix) with ESMTPA id A6C5324005C for ; Thu, 7 Jan 2021 10:48:20 -0500 (EST) Received: by tarpaulin.shahaf.local2 (Postfix, from userid 1005) id 4DBVxv0D06z31w; Thu, 7 Jan 2021 15:48:18 +0000 (UTC) Date: Thu, 7 Jan 2021 15:48:18 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: Re: [PATCH] declarednull: rename DECLARED to NULL Message-ID: <20210107154818.GB25249@tarpaulin.shahaf.local2> References: <20201228221342.136199-1-felipe.contreras@gmail.com> <20210104061718.GB14783@tarpaulin.shahaf.local2> <4e9d7283-94fa-4862-ab04-8c3294f3876c@www.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Seq: 47808 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: Bart Schaefer wrote on Wed, Jan 06, 2021 at 09:33:49 -0800: > On Wed, Jan 6, 2021 at 8:02 AM Daniel Shahaf wrote: > > > > Bart Schaefer wrote on Mon, 04 Jan 2021 21:57 +00:00: > > > So the "bits that need to be named" are: > > > 1) the bit representing "remember that this was declared but no value > > > was assigned" > > > 2) the combination of that with PM_UNSET that represents "functionally > > > behaves like NULL" > > > > To be clear, (2) would generally be used as testing whether _either_ > > PM_UNSET or the bit from #1 is set, right? > > Most often it's used for changing the value of both bits at once, not > testing. The bits are almost always tested independently. *nod* > > How about, for #1, PM_BEEN_ASSIGNED or PM_INITIALIZED? > > The latter was already rejected. Both of these arguably describe the > opposite of the actual state, that is, PM_HAS_NOT_BEEN_ASSIGNED would > be more accurate ... but Felipe has essentially argued that after > "unset foo" the variable still has not been assigned, so why clear a > bit with that name? After «unset», PM_UNSET would be set, and I don't immediately see why bit #1 should be tested at all if if PM_UNSET is set. If the «unset» is followed by an assignment and/or (re-)declaration, the value of bit #1 can then be set properly, and PM_UNSET cleared. Makes sense? > PM_DECLARED_BUT_NEITHER_ASSIGNED_NOR_UNSET is just too verbose, and > shortening it to just the first word got us into this discussion in > the first place. > > > As to the combination, my first inclination would have been to leave it > > unnamed so that it's obvious PM_UNSET is being inspected, but if the > > combination merits being named, then perhaps PM_HAS_VALUE(pm). > > The reason for doing it the way I did is because (I presumed) most > cases would never examine bit #1 because they are already examining > PM_UNSET by itself. > > PM_HAS_VALUE(pm) is actually also backwards. It would usually be > PM_HAS_NO_VALUE(pm). But there's actually exactly one such test. So long as we don't have «!PM_HAS_NO_VALUE(pm)» ☺