Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] First try of null typeset
- X-seq: zsh-workers 47714
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- Subject: Re: [PATCH] First try of null typeset
- Date: Wed, 2 Dec 2020 10:47:58 -0800
- Archived-at: <https://zsh.org/workers/47714>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-12/CAH%2Bw%3D7YWnwDTKV4meJO_KhYE7QfdXVfMnQ8pHOb45TgS4R_GvA%40mail.gmail.com>
- 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
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- 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==
- In-reply-to: <20201201091342.310763-1-felipe.contreras@gmail.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:zsh-workers-request@zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-workers>
- References: <20201201091342.310763-1-felipe.contreras@gmail.com>
- Sender: zsh-workers-request@xxxxxxx
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
<felipe.contreras@xxxxxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author