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=0.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,RDNS_NONE, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.4 Received: from authenticated user by zero.zsh.org with local id 1kiQiI-000D8I-1N; Thu, 26 Nov 2020 23:30:10 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f181.google.com) smtp.remote-ip=209.85.167.181; 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-f181.google.com ([209.85.167.181]:39492) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kiQhu-000CsP-C3; Thu, 26 Nov 2020 23:29:47 +0000 Received: by mail-oi1-f181.google.com with SMTP id f11so3887270oij.6 for ; Thu, 26 Nov 2020 15:29:46 -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=uQUF9dPfGzw4shhz4MP23pUpgqYfYcMvP4u6GW68h+w=; b=mSud43Eu3QYhKnJEcgIHk+E+7167txQV1YWgxAKUFePUn9iLS2bduSjYqpw7Ya6lQv DtyoeXoTNhD2ilz96DXF9xmPB7uFr5gYWqK91SM5FEORevQo+Wv/3RGwytrERJ+ksmcz Imja8FnflzT1WmfA0Qc9jZ8gsJWa4bpryOHkdl1CzCczfXvhVxo81MgkcVUz60XiY8nf RcVbw4s208L2z24sjR1QFvxJ01S9OT18L6Xur9rxz+JYc4MjqWRRogUZ5VaQNEI4G00P 1DhARATEHZTaa1BzsbB5vPhtgt9HbRMrIB0VvaRoM1HLyzCrwSA++kiscBpSduA+TWH4 g5ow== 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=uQUF9dPfGzw4shhz4MP23pUpgqYfYcMvP4u6GW68h+w=; b=Pl8oDn/SnQvnwBIiaACsmVpAF15dm3HX7cloUZG9WSytVxHtdvbmyry4EWG2PYUqtW LKQvUt3bTCDzTFfTGfJsGKiAWYJNkU+L10ou8z3Dp8rN8xrBrHxsIGMuKLBhaELZkNIy J7qhJxJTn2Fu9GmLhF5k4iij36K4OE08d0y7vP3LdOrJJNkcah4CYjc5TUohPhQD4Mo1 rAqqa9t2Kgd11EhjWH47ahPIFaV2/1S7kSi44usY8XmFFWxhvUydmjUFICQxDDlh+rCd s8iZ/wtdAzy9H2P7X5yFsj5oC4sU/DbZX6z0Hm0gDKAkWyMOYflWTSiwWgrXC2HvV1YI QI5g== X-Gm-Message-State: AOAM532m34x+tQpJTO/nx/IZW+CqQcCT9SurOt21l9Md/f8JBgiVG7+L ZyMe6/yL/mVBkKT1uafrrxI2Xbf1MQdlpftDzDd88g== X-Google-Smtp-Source: ABdhPJx23O0EyoWPHIo7plWpN8x2FEg2JKKxYOIj8ZtPTP1LDnkRxVRH6ErzzM/2fYMScSp+t2QlOTo1jR2SdDn3nec= X-Received: by 2002:aca:6087:: with SMTP id u129mr3513643oib.173.1606433385257; Thu, 26 Nov 2020 15:29:45 -0800 (PST) MIME-Version: 1.0 References: <20201125131921.vay7h3xk5qn4odgg@chazelas.org> <20201126061029.in5tpnrg5bplam5k@chazelas.org> <86243-1606389706.499549@-gQx.nNYG.4Z3k> In-Reply-To: From: Bart Schaefer Date: Thu, 26 Nov 2020 15:29:34 -0800 Message-ID: Subject: Re: More rabbit-holes with unset variables To: Felipe Contreras Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47651 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 Thu, Nov 26, 2020 at 1:31 PM Felipe Contreras wrote: > > And you don't find it inconsistent that the internal value is > *different* from the exported value? That's a loaded question, because to answer it requires conceding that there exists an exported value from which the internal value differs. There's no way to "see" the export namespace without forking an external process, so only the internal value matters. That internal value exists for the sole purpose of recording the fact that two different namespaces need to be synchronized whenever either of them changes. The "difference" occurs because neither namespace has changed yet. The fact that there is no first-class "not defined" value that can be employed for this purpose is the same issue that got us into this whole discussion to begin with. We're back to the point that from inside the shell, the only place where that difference is a distinction is when you explicitly inquire about the "not defined" state, and I'm already looking for a solution to that. > Plus this: > > typeset -x FOO > > Is different than this: > > typeset -x FOO="" > > ? It also differs from typeset -i FOO which internally sets FOO=0 but doesn't export it until something changes. Diving into how zsh represents the relationship between the internal and exported namespaces is a whole other ball of wax and is why I tried to keep it out of scope before Oliver brought it up.