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 1kj3X3-0008BX-Cb; Sat, 28 Nov 2020 16:57:09 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oo1-f49.google.com) smtp.remote-ip=209.85.161.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-oo1-f49.google.com ([209.85.161.49]:45734) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kj3WN-0007wS-Js; Sat, 28 Nov 2020 16:56:45 +0000 Received: by mail-oo1-f49.google.com with SMTP id p15so113521oop.12 for ; Sat, 28 Nov 2020 08:56:24 -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=89i7lXqrNBC867prE4d0TiST29cEReaUdAMQ1XgIBLo=; b=B4rTo7KAkONzXV2UduP0XSLk+y4q9X9OcY8fFxl1RhXI01UIQtjD6+IK4QnpMwt73d Wbyw68lHNQzqdyIf/7yRrjFUetpptAS94KH68Vka+40eJkDOXEmRXX72bcrD4uAAzJ5S gvQSSmzrqXNdv/OMxXGn0a4qvJx/MPGvFvansjkWyVNxra7m2jSAZv6OWeTeU9xplDWF 7wAERXYSHC8sSiWZAzfq4bQmWhQFE1zqFVCNg3vIQSte6C53N0bB98ZVeE90ZtDYINni QUw7ixfICHrzanrVeUPUGnSARzArZ664UwICuMRmpxvRoYTk4AsF2f2gwgeKd1+pGxg8 76/g== 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=89i7lXqrNBC867prE4d0TiST29cEReaUdAMQ1XgIBLo=; b=XwS0olMWtP9mCV8/cLM1eJTBzQSIRh3uVB9KiDnJ85pW/lzdgFTisAwysmu+C87l7J Z9iDaMZPr/4huy308KRjJERYoqpUHaogL++WlAQSmx78gr/JOY+LXgo2MmFVJKLB6RBN 8RYbCqwhqWNms9O8Gv1P6avb9GqDLaPFs/JYU5fodqS1rRqdOMC7zuvZxBhE6K38Yedp lLYjFUaJ5Ck735+wvh3EkXbwg2zPVxETnanEvl64wIi/WVedPcDESJcNvei3ih0a3LHT bJM+BsR0e9eYpYdDA9tdKQ/1cc5j+c1du55yq1OfwW+EEJX6iArGRhP1LH86AWwv9iWM ooTg== X-Gm-Message-State: AOAM530lfFEi1usE+x4jdNTBGuDvZWwbMZFVvoNYoT93HqZN3TddMFz/ NPAS6uQvjtFn/xYbAcrRWxwbnlk86+B9g1svr76Pbw== X-Google-Smtp-Source: ABdhPJz8GMFD0G88u9QyNCFu01vGuU+QE/GeAeblXIqeFCe+tyjBTvGpiEcBpQvS0igQoBDX/CgndnqT5irsQ6ZPYNM= X-Received: by 2002:a4a:3b83:: with SMTP id s125mr9824415oos.82.1606582583163; Sat, 28 Nov 2020 08:56:23 -0800 (PST) MIME-Version: 1.0 References: <20201125131921.vay7h3xk5qn4odgg@chazelas.org> In-Reply-To: From: Bart Schaefer Date: Sat, 28 Nov 2020 08:56:12 -0800 Message-ID: Subject: Re: The emulation rabbit-hole RE typeset/unset To: Felipe Contreras Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47696 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 3:36 AM Felipe Contreras wrote: > > An integer is not a "simple scalar", and seems to be useful unset. > > Or am I missing something? Two things. Possibly three. One, 'the only useful "declared but not set" variable is a simple scalar' was a statement on the ambiguity of the austin-group proposal that you excerpted, which explicitly made "declared but not set" equivalent to "unset". Two, that neither bash nor ksh actually does make those two things equivalent. Variables in bash and ksh can either have both properties and values, or only properties, or neither. Variables in zsh currently have only the two states of both or neither, because the latter is the definition of being unset. This is what we've been saying all along -- zsh currently has no provision for representing "only properties", and consequently the only way to get any of the behavior of the properties settable by typeset options is to provide a default value. The only thing zsh can currently represent independent of some value is function scope. Three, maybe, is that math expression context has a special definition of the meaning of an undeclared name, which is not the same as the definition in the rest of the shell. It's not a parameter expansion in the normal sense.