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 8692 invoked from network); 3 Dec 2020 08:45:10 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 3 Dec 2020 08:45:10 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1606985110; b=iUofE1CYCh7Nhd9L1ugBCNXGdewxdfl9Dtttg1o3eP7FZrNYuif1M+7uEU3biOxtdah5q5ij4c JbbSTF6H/b7zxavwdmriRCxXZbjASZL/yX3GorIAmuqgmCx4TxNz6AvAMpVG8LWbjHDnoetgoN oZ07iukHFhykfCL9giRk3DbvCVn5yyDQFhhtwFiEdrkigH6SaqPe4d15sM9iWpB7mv43hmBldZ JvDadD5+wxCF9LEKUQQ5g6dr9a1EcIIgbKh13/ZiU6Dnf3l0+t27cACpKxVf6N74tiS3DG9CsP b4LQyNlbTC66aB0SRWBvLAFEglWj1YTsUP23DSKfzVqBSA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-io1-f65.google.com) smtp.remote-ip=209.85.166.65; 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=1606985110; bh=CkKzkWiQxVX3jbrDsUfvZ4JYkOTrQz3uRR2gRKS6c9Q=; 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=dL6/8UeCMEYm7n/BzEOWvoT7iExGlpDlwtrpzoxjCduBCnUFkuVuDkFi8hO5Eh3zaYUN/jHVrd WfVikerbgY7HGdxUg/f20B8FZd2lXMpAxjiSQjron1Sjr4hNoo4+txDS+gL2TPPGaX/1rkAjjl FCIkADePydMhVMNvi6IvGqFKexUjywmXEHkYKsFWOyokJRI4fLEfgptOemCXjZwdFNf5MgXVNw oN+Fun3mAhgnRv5dZNvhn2Xy5ml+KU1rNJn8pA8uSMVlX+WzDOddHfOd9ssAVixxH99JIih9bk 1ti2iuzrQUVtWCbuXjJ1vux4hC8JMKZrPQF4529l9mmxIA==; 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=CkKzkWiQxVX3jbrDsUfvZ4JYkOTrQz3uRR2gRKS6c9Q=; b=SkI+TEtXakYc6/wzk9CzHd78eX RXdN010Z8lTdiO99VHSKxiPlh9OI5QoUNfhIhTJ1VVezhv1eDzWbXtlsvHMpgs7QOIhBtmb54SLNU 6DymXbUPCUwGZBRTL2nAOQ60KJcJrEQnY/hhq3bGscUhgBCcXYwyjfi71eu9Zi7nHo4NvuBcjbkLY Fzu3LCGBtDYZluFlDYY1268FvtJ6lvCWqzWBVoAsOEXEGKE3SOg2fje0qT4bwnEAegTkYjhFr9Rq2 JG3SnYKb42MW91/ytvlzxmUkBaYdFqW96Wrth5LzdPihw+sDjrGjQTibDN+Hw+dRKZQjlIUq49w00 9TO6BW3g==; Received: from authenticated user by zero.zsh.org with local id 1kkkEe-000FDE-0M; Thu, 03 Dec 2020 08:45:08 +0000 Authentication-Results: zsh.org; iprev=pass (mail-io1-f65.google.com) smtp.remote-ip=209.85.166.65; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-io1-f65.google.com ([209.85.166.65]:34765) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kkkEM-000F3p-No; Thu, 03 Dec 2020 08:44:51 +0000 Received: by mail-io1-f65.google.com with SMTP id i18so1278295ioa.1 for ; Thu, 03 Dec 2020 00:44:50 -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=CkKzkWiQxVX3jbrDsUfvZ4JYkOTrQz3uRR2gRKS6c9Q=; b=ESjV4tvPFdlEflqxxoqfADm5xSzPl0nSRToeWs6rUAIXnYO9rFenkgEfaWmM5xSFZV OKeNQd1qlyF/u73qr3I+a5ki1nBVC/3Z3aeudj9gC0ffu7h733RmLn7wZY7at9CIwswn aWvb5nLnchyTDQugdnUroMk83Lm9PkYYwsNCCSi2NHoZIvYi4rvF+Umge9TPFdQ7hjkP uPKuVgP0c+ydGPgqXGh3N4dZ3c2TUxPyp0sxeonhPeGwJeMju7eaI3Y1+mhz++5mXhGc 8Q6a2Eg3p7afG/aedUamL+xdPqurTdz0ulDaLxz89fzCaCJW1lR68b0L/uFp3P/FVpkY G7lg== 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=CkKzkWiQxVX3jbrDsUfvZ4JYkOTrQz3uRR2gRKS6c9Q=; b=mfwqu+jeT5V2dSmUd18x8+H0Z55IlYuuFTcizSyGaF0XpSVlPf+90iCwtDVhjbFWv6 /3Se/3RjpS2omUG9h7aMC4AAwg4hUGy1bkkvPKmW1ASldq8/fE1QOYXhxOGzpjzLBJg0 hx5OiWfgfplpn5L/80u7B9Trwb+Clefw0zF1gz0vUBI61an3Q+bHRZ1I7bdYOMk5vA3n GaXq2uRzesXfAOjFafC640hHL6Vks+8vdWAlXoBFtn5t41HpDRuEulEe2ETFENoGFjbA vrek/m4pIHgBBPg77Xo/SKpKoTFrJ+OEmeG2vmNbRat6elMR8rKjCKuRRmbFr7xj9JMS lIsA== X-Gm-Message-State: AOAM532PcmuOchhJMHYLEit3GXNNfsl4KxeczwdX5VS+HSwbBGdryBBB wKqmqAeqrVoclehJLXPM4jx7zSuyIORRe/vvTAc= X-Google-Smtp-Source: ABdhPJziX/WIvt/gSUEEbem5HW4uViRBNO/rU6z6i5Fj6WPRAMl8p0NZ7TUN3Ep2J44f2cilNwg1I/QewZa8lPeyQmo= X-Received: by 2002:a6b:b514:: with SMTP id e20mr2329995iof.105.1606985089019; Thu, 03 Dec 2020 00:44:49 -0800 (PST) MIME-Version: 1.0 References: <20201201091342.310763-1-felipe.contreras@gmail.com> In-Reply-To: From: Roman Perepelitsa Date: Thu, 3 Dec 2020 09:44:37 +0100 Message-ID: Subject: Re: [PATCH] First try of null typeset To: Felipe Contreras Cc: Bart Schaefer , "zsh-workers@zsh.org" Content-Type: text/plain; charset="UTF-8" X-Seq: 47717 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 Wed, Dec 2, 2020 at 10:59 PM Felipe Contreras wrote: > > On Wed, Dec 2, 2020 at 12:48 PM Bart Schaefer wrote: > > > > Applying the change to integers and floats is one of the reasons I > > went in the direction I did. > > Yes, I suspect that's the way it will eventually have to be done, but > others argued "typeset -i var" should initialize it to 0. So for those > my patch already does what is needed. I've two opinions here. The first is that it's not a good idea to introduce a mode in which `typeset var` declares an unset variable but `typeset -i var` doesn't. The motivation for changing the behavior of `typeset var` is to be more compatible with other shells. However, there is no shell where `typeset [flag]... var` leaves or doesn't leave the variable unset depending on flags. My second opinion on this matter is that it's not a good idea to change the behavior of `typeset -i var` in native mode with default options. The benefits (if any) of this change would be too small to justify braking user code. These two points are independent. Roman.