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_H3, RCVD_IN_MSPIKE_WL,RDNS_NONE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.4 Received: from authenticated user by zero.zsh.org with local id 1kj6jJ-000DfH-OX; Sat, 28 Nov 2020 20:22:01 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f49.google.com) smtp.remote-ip=209.85.210.49; 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-ot1-f49.google.com ([209.85.210.49]:46646) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kj6iq-000DPU-M1; Sat, 28 Nov 2020 20:21:33 +0000 Received: by mail-ot1-f49.google.com with SMTP id z23so4031519oti.13 for ; Sat, 28 Nov 2020 12:21:32 -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; bh=sCYAu0R4N5t4hfwkN6oHpvGz667NqXHy5az3ALnW+s0=; b=wB5G+gIkZjQB59fMPPDatdZFyZskQstqfVRh96HhYKsSF4IaIAbVx+37XUKh63Z0Mt 7RrGafQ2q1q1ftkVyc5jadT8ojIKDsl0Ra62Kr6NKvF9Hl9KyM+muevDRqo6hTAhTFVK qp3U0fHptFEyi+xfsnN/uahQDwJ9ZTDbP/1jNOn9Gqq4RDBGIwYVPeHjkWyhI4mCF4uZ nPaZEaRkBpO05OB9GXBBrqgnnZPmCL97g7NlQNxFKxwWE8Vrqkyccf3CXKgNn6uDLy80 vrwxAU43x2nA9e8YDq51dDdAHSakJzi4chGW3qdPP6ZXxNK24AWSzn+l1yDKrGBpc1CL Q1CA== 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; bh=sCYAu0R4N5t4hfwkN6oHpvGz667NqXHy5az3ALnW+s0=; b=fjGycM9MtkmvDLJmWvtn8dHttF9JhlT1aG+fLPDYNSWmj/xR91+u1+urNeAR3OyCtk Up8duFS9OX48riuUbN2Gn0Vxe8qpCdPcTP3pp3Gx+8RBkdgYGhcctZr5O5Z5p7qD8erc 7O/IVok2n5gFu32z24NMXV7odCF6BN/hpD+E9ElNjDEusDlA0vML42I9Ury1FvoMunGy oSi+Yz4KBPQV0dzf+1Qk21oU/AwvtbqVe7iN1HEpvGuzz3qIjgB/bcBOqbFKWZRgLkq6 sr2V5y489MabRLNHAuqBYAC6H4J3YU92BYun+R4OE66YGNBKlBhXmR+wv/sFoUx0bFVm xg8Q== X-Gm-Message-State: AOAM532t21KhiM844Nmprvky86kfvxsEZ9eopjkr/xhTfFUuAc+pfgza qqdIXKoZigr8e4Axz5YQ5yZikKKTbJpK8hx2baANgZlmLGs= X-Google-Smtp-Source: ABdhPJyU71FTLmOxTpR8Bl3PB7GrdJQhFYXpY3go632L8vxAbIpqenycwClJE3uFnRODxKYOsAe5xANYHRMbjV/oyKA= X-Received: by 2002:a05:6830:1552:: with SMTP id l18mr2832891otp.229.1606594890776; Sat, 28 Nov 2020 12:21:30 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Sat, 28 Nov 2020 12:21:19 -0800 Message-ID: Subject: Re: One possible answer to typeset vs. unset To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47699 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, Nov 28, 2020 at 11:49 AM Bart Schaefer wrote: > > concealing the internal value rather than altering the way internal > values are defaulted. I should note that it's possible that this introduces memory leaks for global-scope parameters, because it introduces a case where a struct param with the PM_UNSET flag remains in the global parameter table. Ordinarily that only happens to function scope parameters. I think such leaks, if they exist at all, would be detectable only when the shell is about to exit anyway.