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,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 32490 invoked from network); 1 Dec 2020 08:50:22 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 1 Dec 2020 08:50:22 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1606812622; b=AtlhsDqzC/4RjIpwN6njNKtqgVHfDJbxTJVM3+BbqSAAFbz1mDZ2sq0yqM1XzzUzbFhZgyFusJ 5zYuaMjAwBpdMhew8eCuSxP1j4+XPgL/SnrUCeDANcWFVLgB+qacMLYFqODIOlSiYsM8mf0X7n QiaV3kUh0aC8nzZuq4S9Qb9JIhi5Zs7KhhuXZb+rat1K+CfQi34fsGP+AWVPC30g+lDqfWxC5S HkSow0SzPA1X7+XVwrkbVi3KB7+pJTOC0LW3tKhaiZ3YyZw8WEE3YLf3PMUnKYITWYjIU+tMjk 75VgJALkciEMdEDOHFM6l8GMeMEy+wlZr1HXyhqOU9zMGQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-wr1-f53.google.com) smtp.remote-ip=209.85.221.53; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1606812622; bh=mczhvPBnnW4pRAHe91PEaIMdfbyzMp/j7dyizbZtpQQ=; 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=06ByESi88AXRTNsLw39pO2Pm3/DYTUmLqaI5yz4K9CgfyGFAtA0TX854jUtdDx38huKvD99dV3 T/Tn4pMjHgMNYGDm14B5CKX8x3eoiSe1YDpRV0ysoOVdHPwCsiv9znDWw7f37nJiDZPGARakzp awoSB7KRlkt2AJj3anI0hiMsJ3L81cxVSedp6Sft0lU9OgR1tbIfwjnksyzHCjKyVhtZ0SvjTR oogsSbtWwGSISa7Ubh/3HVZK2BF9s2Khoy2k2N7CqOdOM2c6LxrrAOQL8flQLkWDbMoYoiIqRZ JiTWthuw/rNkwo9nuP82vNr2cbH420Q/jNmbvo6uXErXRg==; 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=4MbF+vZtDZtj4fj3AApI2aMjucQE5O+ZDzqouKbSaOQ=; b=NRmP5wkaUcgiHfJ8DPDmpP09SU r7Cinn4r25c4Uqc/6WSrZcl6szrzfKgkhEX8OUa36YMTPRrmVjmPawtF4LJ5W3aqm2ni89fFMCPqF 9nAgm2xpuoQkTS8vsUATiU7Cu8f2ClI2u4EGRqlCgukkzw+G7xmauyEpE055nCEwdJ1n+1q0F7g/K hmIAGE1F9j0dRlqa5e+wJbp79l+CiTl3VRzoCSi6ZfFr5nT4HK8zAxPLwzMaQlsFOJujXlfwP6ZJE G3cvyQOOu54ugjAMk0bOAFGdRJZcolnKlbKLtYHmvf7zYWBmHpGukhXfyLv9bgBdHrSy63MyVK27G V3S+Lwlw==; Received: from authenticated user by zero.zsh.org with local id 1kk1MZ-0003w2-DY; Tue, 01 Dec 2020 08:50:19 +0000 Authentication-Results: zsh.org; iprev=pass (mail-wr1-f53.google.com) smtp.remote-ip=209.85.221.53; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-wr1-f53.google.com ([209.85.221.53]:39858) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kk1MF-0002vW-JU; Tue, 01 Dec 2020 08:50:00 +0000 Received: by mail-wr1-f53.google.com with SMTP id e7so1370093wrv.6 for ; Tue, 01 Dec 2020 00:49:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4MbF+vZtDZtj4fj3AApI2aMjucQE5O+ZDzqouKbSaOQ=; b=CNtYvS0qVjB/YJfH7RKuZcT05b3rzGbtzFV5Mpn5uXJr74X/EZBJgP86erpYdefFGM EZV1khmKa+jusUK/bZ+Ey5wopDZ1k4OGVi6u/7OnqRZq3nLJLwaxIWHa1hZXAMsat8vq ICnjuTpgdUBcdXZ6jhC/bddDQiWHhdVFOO0qAcawK8RSmluJBToilgQNb57tIgECBJwr rmtcRnfoQC/dJv/1Q2CiAuXVyFhphgpqIyBadO99ARMz6KEFzv6GyCTaXCfIBaAt2V12 bNV+K6N3S8DieIA+O39+kugQiKpWSHd86c5g1zr4hbuPpM2QCvmRHUCOOGifjyHdMI2V ypWQ== 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=4MbF+vZtDZtj4fj3AApI2aMjucQE5O+ZDzqouKbSaOQ=; b=g8Re2ERixzaFllK1F3TlB+aExs+bknERgDvYMvufgcFvxq0mB2eUMcMY5JB9BtRN2G Me1eqGjuyMLAt8P1COUPwKKSs5s8ouWB0isuULz4lzfzN34ELBdAefjGJFPQgbl8vRf4 WPQ7awBtTL+nPkuks1FRb/fhlsZ5vFkdbXEFgGwnDVd8OJBUv6pCCuYznIdUpn3JXKlf tP2Ea10c4YxA8L5JG5dkaFo1yyxAbbC4mXygif9IMURd1KeV7vp3bQlS2tKBRrGY2397 ryFlUGtYL5uLXdM2dSSVtVuHKY7nJ/OxY5kesiRwLRtQUvIFx2zD9DKx0T7P3VLczZ0r LSyw== X-Gm-Message-State: AOAM531trdhZAiDK29E7eI+mkAARkrPZhs3dMd/2A2aUcbEdErgE4NTP 6QJr2mCT2N05JLwRE1MjD7SSoGnS5cVNqTiKawMEp4iA/mU= X-Google-Smtp-Source: ABdhPJz+iK4GAFo1kmBT+gEfCHYkjH8ECvKNP6aRntBu4oCMT8cdhtrDzjT1bdks40lhtFeNcoTqFChslRJu49m5Lso= X-Received: by 2002:adf:e788:: with SMTP id n8mr2464428wrm.84.1606812599060; Tue, 01 Dec 2020 00:49:59 -0800 (PST) MIME-Version: 1.0 References: <20201125131921.vay7h3xk5qn4odgg@chazelas.org> In-Reply-To: From: Felipe Contreras Date: Tue, 1 Dec 2020 02:49:48 -0600 Message-ID: Subject: Re: The emulation rabbit-hole RE typeset/unset To: Bart Schaefer Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47706 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 10:56 AM Bart Schaefer wrote: > > 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". Yes, but this is a statement of fact. It either is true or it isn't. And to me it looks like it isn't. > 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. I'm not talking about what is currently the case in zsh. I'm talking about what should ideally be the case. For bash, for ksh, for POSIX, and consequently for zsh. > 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. No, but it's still useful. Cheers. -- Felipe Contreras