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 29211 invoked from network); 6 Jan 2021 16:02:51 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 6 Jan 2021 16:02:51 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1609948971; b=apfG9NRNXS+jKl+erlV0dozZTkZLzsSXXJ+kk2eZ54a0Yq75nsCvfS2U1vHUzpO2ygLj/KwbbO r6qquaQnCyyQ81zDTQln+ZSUcMrmTs2odUaVeE70yj5nz3fCS9eMJhMTiSNTgn9/kUwSU83YTR n5VfCPYiqZPLfHcCJTdMiQEKrUf/7nFby+I71d+zkWQXiTgBlWarU9lb4COQnt8SWHyUvuw/i+ HjRhVvEl+49Vk8YTgX2zyGWERLHVX6dMHX0UoeUJG3CINjTBlQhxbS+mnD0swvP770X3nR5Hil H8dxiHVzY7qOLQZ2JH5P/QjlrEJV5slZAP2oex0Ozh3y/g==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out5-smtp.messagingengine.com) smtp.remote-ip=66.111.4.29; 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=1609948971; bh=ItPkmCnakJAHuqzw45ZouTrRKV6oOPGeI1ju8l5LVEw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Subject:Cc:To:From: Date:References:In-Reply-To:Message-ID:MIME-Version:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=dPGU4mt9pcBC/l1ZsL33LiE16sYgNNeBLd5EPPVIqR0x7NCfpr32J6UnyL3kQjr7HgqmM1i9E+ 8YpKu/HItLspuimbQbzk5eCdjVsFmvYd/0HPGq4F9UwoCcbM3vQOvyR+kM9woGHZGfBUavWTo2 VySZBQDTTwnF/JAM5PEdxB27SkGwCCBtZUuseMqoRCuobTCJbdEJY7r9/sqclbxoEeNdcpJosH k214l3agCMjSY+wTZ5KoynKFxjUfDlbP0SwLK54sPjLxkg26modKsEfdfCodLh39m8KcByvkc6 Rz6IOuqr50vTYfwQB3O0dSq4XiKCr9F5N4m4/OROYjjtDA==; 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-Transfer-Encoding: Content-Type:Subject:Cc:To:From:Date:References:In-Reply-To:Message-Id: Mime-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=ABFEeucsDpOLkxhK6gBWQfNCvgqymF1H4jph7xkd8KE=; b=Pe9VwHNDWDgXFDqP75kkSdfLts 1RvJm6F0kkccOLV5kf/+xY9ureQZcGE5bksZYtEBO7WORZXcUnS7A+NGhmv1mC6F2kLDrpQTXiooP Utq6sQZIcmnL8yffyS25wx8xyTJv3nK7YPFlmXiy9yl+f66PBzdjEmQckOhQeblwaoHG3R8RxGsfm MPWKBYlzV/JjUjmQwxDwS5VFFRtlx92SrruFN/h1Bc58VKX6y0cy8OifaEJQAWSR0/IyaDZAYnUjf l6roMFqMIrLS8f180Y/gA2MqmbjhNH99xr4c2lMamdf08kE9bTLoTa7pUGfCJhKje00mqqFXXLCb1 gl8PlDYA==; Received: from authenticated user by zero.zsh.org with local id 1kxBGt-000L4q-EK; Wed, 06 Jan 2021 16:02:51 +0000 Authentication-Results: zsh.org; iprev=pass (out5-smtp.messagingengine.com) smtp.remote-ip=66.111.4.29; 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 out5-smtp.messagingengine.com ([66.111.4.29]:47169) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1kxBGd-000KwS-7b; Wed, 06 Jan 2021 16:02:37 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 596FC5C0140; Wed, 6 Jan 2021 11:02:33 -0500 (EST) Received: from imap37 ([10.202.2.87]) by compute3.internal (MEProxy); Wed, 06 Jan 2021 11:02:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=mime-version:message-id:in-reply-to :references:date:from:to:cc:subject:content-type :content-transfer-encoding; s=fm2; bh=ABFEeucsDpOLkxhK6gBWQfNCvg qymF1H4jph7xkd8KE=; b=pdv42z3/l2yZ8gootyxb1EczCxjSAg62dJkcG47X3B WqfFQhuHmL8KX5j5C5ZhhLhSUO/1J6P436UVlNNp2vzKBGj3LDtgIv6yTPs94mxt H7teOqhZZPXbnOE8nWsxZNpKXqtlY8qLAdxwpKHKtPo1KQYOWQqa62H2ThwmfIaq mF/HKrbL62Yj8fHSF+/jtgPzy3T9uWqm92UCUxj78R4Px60MZirJFLwEWsVNkudB 56rfLu1wHTXiF1R92f/AfiDxqjLpP6km2bDf0yExj+WGpS8YnYyfRjNwqxedJtFq zFVQhrzMx7yLq0h0oHQNGG1PgwZjFjOLUiG7XprJfFBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=ABFEeucsDpOLkxhK6gBWQfNCvgqymF1H4jph7xkd8 KE=; b=q1CxXMDih44apoL3Gp3hpsNb/GEZXvTDOIVZJPRRnA9sTctnGmHllZtWM 0kVmFWldhdQ56Ba0h/cKKwrms0K45gRenJGcpCVayiSjB6JhayGRlmTUx/09Wa6W dZK22WKmysV9v3dgO4tHLIeHf5jQa5buvTh1IQ+8dHLieJ6xXrgPbA0AFtMtflGW xL5j6rg25IgIKpf0B327HTAJsVANUxvseXG0mRAgxQb8z2i/78lZrvdQdUGfENYP JknBI887tR3sq7085J5ykdcvSIEr1zOKqvWA/+0H/Z44dV+T6/OAttpWIq8EDshf GNOl2BkX39Uo+KiYEhvFGZF8iReaQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdefledgjeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfffgr nhhivghlucfuhhgrhhgrfhdfuceougdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmh gvqeenucggtffrrghtthgvrhhnpeefhfekfeevieelleehiefftdekudejledvhfdtjedt geegvdeuffefleehhfdvgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 4FA7A1900078; Wed, 6 Jan 2021 11:02:33 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-Id: <4e9d7283-94fa-4862-ab04-8c3294f3876c@www.fastmail.com> In-Reply-To: References: <20201228221342.136199-1-felipe.contreras@gmail.com> <20210104061718.GB14783@tarpaulin.shahaf.local2> Date: Wed, 06 Jan 2021 16:02:12 +0000 From: "Daniel Shahaf" To: "Bart Schaefer" Cc: "zsh-workers@zsh.org" Subject: Re: [PATCH] declarednull: rename DECLARED to NULL Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 47802 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 Mon, 04 Jan 2021 21:57 +00:00: > On Sun, Jan 3, 2021 at 10:17 PM Daniel Shahaf = wrote: > > > > Could you summarize the bits that need to be named and the correspon= ding shell > > language incantations/semantics? >=20 > There has been a series of threads about this, but to try to summarize= : >=20 > In current zsh, > typeset -i var > typeset -p var > print ${var-foo} > produces the output > typeset -i var=3D0 > 0 =E2=8B=AE > This disagrees with e.g. bash/ksh, so the proposal is that with > POSIXBUILTINS set, the same three commands would output > typeset -i var > foo >=20 Thanks for the summary. > 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" >=20 > We could of course simply never name #2 and always write out the > bitwise-OR, but that seems cumbersome. >=20 To be clear, (2) would generally be used as testing whether _either_ PM_UNSET or the bit from #1 is set, right? How about, for #1, PM_BEEN_ASSIGNED or PM_INITIALIZED? 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). > As I understand it, the objection to PM_DECLARED for #1 is that the > name implies that only "unset var" should ever turn that bit off > again, but the implementation requires that assignment also turns it > off. Similar objections of English language semantics conflicting > with the implementation have been raised to other names I've > suggested. *nod* Cheers, Daniel