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 2752 invoked from network); 13 Nov 2020 22:18:02 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Nov 2020 22:18:02 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1605305882; b=aBGtGB7ZE0PrOs++6ncpBKFpJF97cCG+OlUp2tfxyS6RT8sh5bPfoOvIAiqVh+Gm9a0NBp4xY8 0qjh9EqiGjFJcZDdyye0Y3c6tDJzBz6Nd2EO7ZKkMKLFQALetd92AQauQVPnREdwUEFrn6/WyM OBlXKJZmbWuMKMQNFDuXfzGC039aNXH3ZLylmasSqEcZPnI8wJnJ9ABSu7+FZzey4KUd/Q9d/R 0w3Xfi43jucngUe4CDDwyK55zAPVBPbl3t25CuJsdVvnTHVoPYen2P6GNRD4JIVwK7qu2qklSE Z9HtV2/in0ATysPURkBL3kMwoF/IfgDrc9o4A6yXQ0j04A==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f172.google.com) smtp.remote-ip=209.85.167.172; 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=1605305882; bh=lK7il7wwA/bakWZVPIRILPSgNFfcYtvf6DVE0OzweRo=; 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=XP3upNV/chNfWf9Z62eljUiEoqXDieC9GGpczS84AKWcrm/5GqMqs6m5AFRuK1w7N7kz1FT/ba AS77QFd2FmDMWgiqAmnTF1CKOpASUVSl3PxgWBqiE/SE8oMZz5Vp0ATWROL2Fq1N0D35ZzSzMm +Xs/m63+vgdkrw00akdgJ3SH51Er0JNBQ9jaSIht3vS5vzlDR3C/qgHizD12mhH6u0DUr+C/fm xmziQGnsJ25uiTrGlvVvPYnpTdG3DVTaScfAUCT63qb3NY5R6FVxdyTpQE/tgvidPDxkcXRIE2 py2bWWoBJQnsUs1Ied/14YL7rSJqnbbC6ZjjdcgfD+O5yQ==; 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=PAtNK7XmVBbYfErKGNI2EAClruxXZQ2XfDJnd+q04Xg=; b=EkWu9S6Z/Ml0hgNhD46zlB6ZK5 SLPfn9fjc2HBH0beat8ZSSe/VkkHykh1j7HAiBF765UlP4OkfKEatzjTwbXFCEQx0sfJKVSow6aaY 1gCtuYBCEn0/2xuOLg1naxUSUgXdXGzsdPHGXbN/htUpzuEJ4vKEssqdAqbLyuS5Roa+AAfR/5JJd FTEMcpvnJ4q4OJvRTFh4ZlsMJrwwx8MDuK524TP6UG6hksnoQ0+84y1KaCGkVF0G03ioW4XOimHLv 0Oq4GrUjp0ycUbHTlSRpYplzzL5Fevt6T1cJiPvY/nzt2AdL/OYillG9rz9WxWYe6Q6z4Rl6eSC1u eGdfr0Rg==; Received: from authenticated user by zero.zsh.org with local id 1kdhOF-0006eV-CU; Fri, 13 Nov 2020 22:17:55 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f172.google.com) smtp.remote-ip=209.85.167.172; 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-f172.google.com ([209.85.167.172]:44721) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kdhNq-0006UW-TK; Fri, 13 Nov 2020 22:17:33 +0000 Received: by mail-oi1-f172.google.com with SMTP id t16so12033707oie.11 for ; Fri, 13 Nov 2020 14:17:30 -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=PAtNK7XmVBbYfErKGNI2EAClruxXZQ2XfDJnd+q04Xg=; b=jXFyLkPO75EHqubIp9hYQIY+oqy+mqSU2wMU7zPNagblZQ1cK9UkNfDiS6fncOtEcH FWWPgbLnn3bYbQPq/jmTqeBMtPiUtHBja4OqUujNnAyXVHem1POs9jtDo5wShO1sEHnZ ceuRM27QphVkO/RpzIumGrVYPzovl3QqwPV4VzetLVYoMKX1KtntoVg6BKso9zMkTvvT dPEMYGqghtElyIzh1Uo5uXHgtjSTGpmy+ZdZSzHIrmh2MuW+2J87C4/w1VrXLLkFzM1k zwfoCTAowoVGQVevwfW1n4ygBRl4nIbePB218RMGLU1264AiMz6fJcTRHe/zkwru402g w/Fg== 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=PAtNK7XmVBbYfErKGNI2EAClruxXZQ2XfDJnd+q04Xg=; b=E2sOxlYsKPJH2NigMiwH9DYm+LtQGQZBjpDcVqs/gBtw1dU6E8Lsnf5K7KEnxfINbx iN7yBl4V5khYcmeq4/AXSUwRcTYwwPepijNIS6e13G8/7Cnq6cqpOUr15FP7PGRy6mP4 dAqFQPyFeXw2BIVo8ZP0YaP2X+KJsRciSUlxcza3m2QzyNUsxRA4MDo5QfLdUtL59Dbu Z936pDnymBnV2SsThVRWUeT4/F3ETWhwek7pxDnnZmhf/FRGxt3E/zHaPnb9h2Nu70mW xQ1aiTnXUYACTnvihoWSINRr5HliJAmsFyrjvFpnb/Z6um4/4iaWZtQBwGURHDi3vLXQ 2+Xg== X-Gm-Message-State: AOAM532WD6KYarP0/FNLGvoXKEw/79jnTymYieRYRcppo5iMJ9lKV/nE OX7PtclvjQD8v+KQ6wA+6ilpl6Zf1OklNYXds8X+eA== X-Google-Smtp-Source: ABdhPJy2b/t89b3WbRdNdhtwTvLlKxXrs09LF479EGhl8EAuVxh5b4PPfmjYoQ53KcfIjGfOXAm70ANAX0yGFOQhj2E= X-Received: by 2002:a54:4388:: with SMTP id u8mr2963651oiv.173.1605305849919; Fri, 13 Nov 2020 14:17:29 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Fri, 13 Nov 2020 14:17:18 -0800 Message-ID: Subject: Re: Bug with unset variables To: Felipe Contreras Cc: Roman Perepelitsa , Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47556 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 12, 2020 at 1:48 PM Felipe Contreras wrote: > > Syntax is not semantics. Um, yes? That was sort of my point. > ... there's no previous equivalent of "typeset var". Also my point. > There's a third conception; a non-empty value. Except that "unset" is not the same as having a non-empty value (I would actually call this simply a "non-value", "empty" has nothing to do with it), from the standpoint of internal representation. I don't happen to agree that they're equatable in the semantics of the language, either, but that opinion is not relevant. Consider this from an evolutionary standpoint. To represent a non-value requires a data structure that knows the name of the object but contains metadata to the effect that the implementation must not reveal to the interpreted program any value corresponding to that name. To represent an unset object merely requires that no data structure exists, period; unset removes the name itself. Given the latter implementation of "unset", we're now asked to declare local scopes. The most straightforward step without an architectural change, is to cause the data structure to come into existence, so that we know its name, and add metadata about its scope; but the existence of the name implies that SOME value becomes visible to the program. The historical precedent for the default behavior is established. The only reason we can even have this discussion now is because in the intervening years those architectural changes have been made and there exists an internal representation for the properties of an invisible "unset" name.