From: Felipe Contreras <felipe.contreras@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: The emulation rabbit-hole RE typeset/unset
Date: Tue, 1 Dec 2020 02:49:48 -0600 [thread overview]
Message-ID: <CAMP44s3P7Jc3oK9q=9M5kS=vK7Bw-vsdM=oDdQ99rU0Qo25yzA@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7a0midnHPULDn7tOwSS_fA0cL_zNdvz12pUS47Rgwcc0w@mail.gmail.com>
On Sat, Nov 28, 2020 at 10:56 AM Bart Schaefer
<schaefer@brasslantern.com> wrote:
>
> On Sat, Nov 28, 2020 at 3:36 AM Felipe Contreras
> <felipe.contreras@gmail.com> 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
prev parent reply other threads:[~2020-12-01 8:50 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-25 7:02 More rabbit-holes with unset variables Bart Schaefer
2020-11-25 13:19 ` Stephane Chazelas
2020-11-25 22:17 ` Felipe Contreras
2020-11-26 6:10 ` Stephane Chazelas
2020-11-26 7:20 ` Felipe Contreras
2020-11-26 11:21 ` Oliver Kiddle
2020-11-26 11:29 ` Roman Perepelitsa
2020-11-26 19:08 ` Felipe Contreras
2020-11-26 19:29 ` Felipe Contreras
2020-11-26 21:13 ` Bart Schaefer
2020-11-26 21:31 ` Felipe Contreras
2020-11-26 23:29 ` Bart Schaefer
2020-11-26 23:32 ` Bart Schaefer
2020-11-26 23:53 ` Felipe Contreras
2020-11-27 0:23 ` Bart Schaefer
2020-11-27 1:51 ` Felipe Contreras
2020-11-27 20:01 ` Bart Schaefer
2020-11-27 21:49 ` Felipe Contreras
2020-11-27 22:06 ` Bart Schaefer
2020-11-27 23:35 ` Felipe Contreras
2020-11-26 22:07 ` Bart Schaefer
2020-11-26 20:41 ` Bart Schaefer
2020-11-26 20:49 ` Stephane Chazelas
2020-11-26 21:20 ` Felipe Contreras
2020-11-26 22:41 ` Bart Schaefer
2020-11-26 23:45 ` Felipe Contreras
2020-11-27 0:09 ` Bart Schaefer
2020-11-27 0:30 ` Felipe Contreras
2020-11-27 0:51 ` Bart Schaefer
2020-11-27 1:30 ` Felipe Contreras
2020-11-27 20:54 ` Bart Schaefer
2020-11-27 22:10 ` Felipe Contreras
2020-11-27 22:39 ` Bart Schaefer
2020-11-28 0:00 ` Felipe Contreras
2020-11-28 0:04 ` Bart Schaefer
2020-11-28 10:52 ` Felipe Contreras
2020-11-28 0:36 ` The emulation rabbit-hole RE typeset/unset Bart Schaefer
2020-11-28 11:35 ` Felipe Contreras
2020-11-28 16:56 ` Bart Schaefer
2020-12-01 8:49 ` Felipe Contreras [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMP44s3P7Jc3oK9q=9M5kS=vK7Bw-vsdM=oDdQ99rU0Qo25yzA@mail.gmail.com' \
--to=felipe.contreras@gmail.com \
--cc=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).