Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: One possible answer to typeset vs. unset
- X-seq: zsh-workers 47719
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: One possible answer to typeset vs. unset
- Date: Thu, 3 Dec 2020 13:19:43 -0800
- Archived-at: <https://zsh.org/workers/47719>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-12/CAH%2Bw%3D7a0es6W_Si9YbQzszzYBSuubmocot_8goywaL_Owb%3Dpjw%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-oi1-f172.google.com) smtp.remote-ip=209.85.167.172; 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: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- 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=dqGVgsiZLlvQcXd9vBLN0cA76VwJIglDH2yBdzDP6GE=; b=rj88wbYwbrfyn2h6wZ8BEQ41AxmK9u4hEMUQ9ISFWTlmsy+ZCGPVNlXxJN1yEoecLb y2oC3Q2fTo9PylXWl7Pbnds7V1StiA7aT4KH4Mt0yij1bw5YI7rHCM14H3HCBH5OMaEu AXzxUMbwBSKsftOFFmP9oDgTHTEBRxyQwDTcsiNNBExMwm8mb5BQXNb7brNT/QIEDqPX U3vT9RA0k8FhjmFextYJWiArvLQ9IYzzau/+gnWAOHja6HXTqe3qZ06Xwsv5IvfSzyRQ 3WcOWSb/o6ITXEyMnO/TKdDrG7/aogjj41RxHHh1oN3iVmMymhz4Cx4tCpODKeMEmrNN 4Tog==
- In-reply-to: <CAMP44s2gZnM_JAi78gJwB+uX75Sdx0MQPkW7SZ6tUk85xEjvQg@mail.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: <CAH+w=7Zh8URUiLF2n1x-ZrvKO+=JC8wf+n692sRsFTRbkJrzXw@mail.gmail.com> <CAMP44s2gZnM_JAi78gJwB+uX75Sdx0MQPkW7SZ6tUk85xEjvQg@mail.gmail.com>
- Sender: zsh-workers-request@xxxxxxx
On Tue, Dec 1, 2020 at 12:55 AM Felipe Contreras
<felipe.contreras@xxxxxxxxx> wrote:
>
> I don't know what would be the proper solution for tied variables, but
> I used this hack to make the tests pass:
I looked at this for a while yesterday evening. My conclusion is that
tied variables are already a bit of a hack.
It would be nice to be able to determine null-ness (however that ends
up being defined) in bin_typeset where we are actually examining the
"assigns" list of names+values, but the determination of whether a
parameter is being localized or is having its type changed in a
value-preserving compatible way (e.g., typeset -F SECONDS) is down in
typeset_single. And typeset_single is called twice for tied
variables, always in the same order no matter which of the pair is
being initialized, which is then cleaned up afterward in bin_typeset.
So something convoluted has to be done, especially if both parts of
the pair are supposed to appear "null" when neither is given an
initial value.
Consequently I don't know if your patch would cause a different test
for unset-ness (that hasn't been written yet) to fail, but something
like that patch may be unavoidable.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author