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 10210 invoked from network); 2 Dec 2020 18:48:34 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 2 Dec 2020 18:48:34 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1606934914; b=cl3gEYMGEuoclK6XOu5d+PzmQz/dK2Zjid//6p/rlUWmK/BDv0PuIij0iC5lxa+RvdEHoOXhAE R3p5U4NawBIuCYkoPJ3BsPLlzcDEaCuzhrSWNMoWVEHjlAON9wYrAIpKYagj/1hswKtql6bSuY PVTerc5945R1wdrdc95Q4AlWOS6cEqq/Qk0o21ZKpoAizxaKdpnacyqIPbWyOhu1LJA0bmPBZd gNZSyuBhHxuo+6x442zTNJCAnS+uKEtUPUfSPwta7fRykV6vg8lSFghQWbFejyvxivqea7VDrb n1kwLgVO2GnPBmC+D0hIggdxRoY529qAUrCvTqU2HKw8EA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f175.google.com) smtp.remote-ip=209.85.167.175; 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=1606934914; bh=yeRSKCB5IF+q40YzZNeYzS7ZpbW7SdvqrdE+aakmBvs=; 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=tJu/50fezbJ4oLMLConcxyFkUJFCUmfTzSCLlCNpq5OmV78O+WWFrdADHk0DUdj5fgDvaBLRCR YafMtZv40Os5xHxH8lJIa9oXBUY7Lcb7JNXVOg6Uf7FIHHLw4/wTbcO/TKHao7bN6gPnef1Jf8 9Goqrs5pYD1rSOJsG6Luh2Se1BvR0hMY+sVkQcqFe9Z3d6/2XZIbZiwE1zZJ7N/vl0iT7didcN tZE5dOuPX8Ov8+nsQtDSduGV+Oy+WtWBAOcV3aNxTOmJafkrb7ZyOeYK/6RbzeK9hhAVK0W5tP 3wzKxuAuOMs0xOHxgo6tnhILBs7KDDtSVZlMxn6J9nTTFA==; 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=9T4jXgPOQf3FN5WTKeAi6VT9LFP7qeCAHNKmA2Dnfk8=; b=wrXbxxY8YDG4zBPma1jl1qQg7O U8R4xsiU+j72dEobkCpvSbTyJhSjho+cSp0v+8DUzn9EXpUtKuSS4swVmY2R6K0Fz3LWhyWmAzLGZ 2ihNqijjD6R2Yl7wSQHSPXnk73b2N0dDI5jtkZa2t09VrYhHxhbkXDPSs9X6H0esanVgk91HJTVZS 9P+CKPzD+vGGst1JLvPLN2frjt+NuW2BX+kz7FThfbmQvdasMxccbU68XG9Qn+/V1kO45pTehduj1 QzkaYzFO5X10kFpVagtc68YX2TF8bT9CxDWo5xSXgpH6JqarlYJD61Z57JQnGSeMla+u6kw1/HjBr QmPublow==; Received: from authenticated user by zero.zsh.org with local id 1kkXAz-000JAp-8H; Wed, 02 Dec 2020 18:48:29 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f175.google.com) smtp.remote-ip=209.85.167.175; 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-f175.google.com ([209.85.167.175]:40338) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kkXAg-000J28-LA; Wed, 02 Dec 2020 18:48:11 +0000 Received: by mail-oi1-f175.google.com with SMTP id p126so2660260oif.7 for ; Wed, 02 Dec 2020 10:48:10 -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=9T4jXgPOQf3FN5WTKeAi6VT9LFP7qeCAHNKmA2Dnfk8=; b=HO77aN2db5jiMy93qB0zDxdHYE8GJSMskwY/98hHvQBnXG1AoSi8zXObLdVv4HJMkB HYda9H0p8aX7UOllSAbYWUOwFGDXqlNkk17jmpoPUZlTTWp3ul+AjyW16ZY0A6ebIP2E MmdLAtHw0IuVRWa4zHYm7e3DeH5H3x0ZRNzcz2dTaR2t/yUT9vGTgz4zH+KWc6fnIjmF gu304TlHCHTzMQJftoLoOVyKGLsH4TL1Wo5Vlc2T1VMDIAycpwctTALBXqPrj7DujbHW DpY3wuEZkOA4TvUrMuKkKiSz3a4VuJz92yiq5Ak8JWAIo55evlUUyu8TXnLN8gzlP6Qd JEgA== 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=9T4jXgPOQf3FN5WTKeAi6VT9LFP7qeCAHNKmA2Dnfk8=; b=i4Fmt+EmifmSQaqQOM/bmODMpAN8QE72uALIVPVuhpKn7n5rBaVDwR0JA16lTYP3t5 W5Msh2UB6q5/yh47OPED7ievXiCpngj3Pc2KFa1Vs6EQPJkia+4FXwuAW2vvHDslJ9S/ ygDW98v0VE/Yv9Ge3f+gp3BhbZO6W0dlF6js7JxI9QGof/dqTavqTf38Y/yfsvI0znUR wv1CNKTshrFPvYecGE5ys0GQoAzkU3US9rKhR4LdhRRYdT4Zl05TO2GZtDqOjUpV0Gk2 XOa3/Jh6XdyXEmmmoXBaU35UTm+EpIn91i3KjWXKO/hS4FIjTnm5suHxrhPFXWOiKLBS d1UA== X-Gm-Message-State: AOAM531oEgT9+puKrrZdao3TibISx0PTQGRxnGtneEyBcEnZvPGvqmPX 1k5EhqGJ4m//upE6lCA+J3epSwYZr5rKRp0dCBLJ/A== X-Google-Smtp-Source: ABdhPJyxnomIizV6f179oMu1PVWsxyC208C8a6mCxA7S+xNqozfRUGeDzwIjI/q8PydEV/RuEMRJWB9f/In4dQH/EdI= X-Received: by 2002:aca:bd45:: with SMTP id n66mr2691887oif.132.1606934889064; Wed, 02 Dec 2020 10:48:09 -0800 (PST) MIME-Version: 1.0 References: <20201201091342.310763-1-felipe.contreras@gmail.com> In-Reply-To: <20201201091342.310763-1-felipe.contreras@gmail.com> From: Bart Schaefer Date: Wed, 2 Dec 2020 10:47:58 -0800 Message-ID: Subject: Re: [PATCH] First try of null typeset To: Felipe Contreras Cc: "zsh-workers@zsh.org" Content-Type: text/plain; charset="UTF-8" X-Seq: 47714 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: As you might be able to tell, the end of the USA long holiday weekend has severely reduced my ability to pay attention to this. On Tue, Dec 1, 2020 at 1:13 AM Felipe Contreras wrote: > > This achieves most of what Bart Schaefer's version achieves, except no extra hacks are needed, and > integer and floats are not changed. Applying the change to integers and floats is one of the reasons I went in the direction I did. What constitutes an "extra hack"? > In my opinion a separate concept of "null" variable will be needed, and should be separate from > PM_UNSET, since that changes a lot of behavior. I don't think it's possible to introduce a separate concept of "null" inside struct param without touching at least all the same places my branch already did, and probably others. I would not be unhappy to be proven incorrect, but PM_UNSET already covers all the corner cases of what to do when a parameter should be treated as having no value, because that's how "local" followed by "unset" has always worked. > Also, I don't think $empty[(i)] should return nothing, so probably paramsubst() would need to be tuned Agree. This may be easier than it seems, because (i)/(I) already work on scalars: { thing="abcde"; print $thing[(I)] } yields 6. I just ran out of time to dig further. > Addtionally, this patch doesn't change the behavior of the private module. If by this you mean my branch changed something about "private" in a way that doesn't correspond to the rest of the changes, then I've overlooked something.