Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [Language Design] Should inline assignments create local parameters?
- X-seq: zsh-workers 55086
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Philippe Altherr <philippe.altherr@xxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [Language Design] Should inline assignments create local parameters?
- Date: Fri, 14 Aug 2026 16:58:29 -0700
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=LxRd9D5MQQW5XhUGNTtqWUnuG8mXwumnK0WBbw1ENMk=; fh=RngAOd9wlRc8Glv1v2GOfDUnq2FsyrczungEY8JNfXY=; b=fYwtxMFo6Dkfn1HH6p/YBun0qkBOcorSYAoo/8ai/SMCaRK9OLbTOa8am1tPFy0T+Y ELOMO7rWn8WabZ0RUaR6affuyIIt7VlCtBk/gADdi2cYOqcajPCBBewL9i833UWnOnUV CoK1teW4AsgUlN05im21p71dGmCmmtvaQvj9V/hu579maPvSlVxw3cnlXfO7hWHwWVaO HZwFxx6F0l08YdChlQCoMylMS+ShQO9wHb+kiB9qUy/jILhr+cgN7JvCtUU9Zk5Y6XdY j8Ghs1Yx5QzLmjZv+VlNiN6z+pMUSwHX8qXaW/QC+8pjpr549gkHbelted28MN+5TGLR CHqw==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1786751922; cv=none; d=google.com; s=arc-20260327; b=d/tlVcJceAfkJvO7n1r1c+uqX6pEBX8XV+xLLGa6Igg3gpS/d3oo74k+HzWq0C+91M D84+hpsOwwNBE66jJVNasx6Alte00i3TE9na6/MckB3MVjRonL12VNe30EVXiY0lUwoE wsLqC0Wd4pyglmG1A0PjE81xyPVa/kLVc1Fn6iIvXh7dYfE8yf1wwIc6R1ygho+lNHm7 YdCC+GddJXH4PyTay6f0vbapXPGq0G8BkLur9aTETwXPxEQLjMxLZGr+xJ+efKFYsiSm 4QJm9Q+DNRV2HbZe5Y1LjfxOIueY0Avvj8nSCPPya4Rf2B+McTiBiblC8cuXRNZqxYmM PkCA==
- Archived-at: <https://zsh.org/workers/55086>
- In-reply-to: <CAGdYchvN_Y6p4hNGaC0OFzaHwQZiKkt2_hwXbFxhBGUQL+a95Q@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAGdYchvfg0D+eG6w3pdzZafHjeFxuJSKtE8VK+Kbg9LXQTX9Xw@mail.gmail.com> <CAH+w=7acV-AZJj2Rcje55o6yB=r=z4iXXQ7ikuSgPyv-N4riow@mail.gmail.com> <CAGdYchvN_Y6p4hNGaC0OFzaHwQZiKkt2_hwXbFxhBGUQL+a95Q@mail.gmail.com>
On Fri, Aug 14, 2026 at 3:18 PM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> Is it "inline assignment" or "prefix assignment"? I came up with the former but you used the latter. Is the latter the official term? Which term should I use in tests and comments?
The POSIX spec calls them "Assignment preceding command name" which
seems closer to "prefix" than "inline".
> An inline assignment of a special parameter is doing about the same as a local redefinition. Both suffer from the same issues. My solution for inline assignments moves the specialness to the assigned instances of the parameters. Therefore, it makes sense to also move the specialness to localized parameters [...]
>
> Tied parameters are a complicating factor for both [...] things get much simpler by assuming that assigning/localizing one of the tied parameters also assigns/localizes the other one, which is similar to unsetting where unsetting one also unsets the other.
This sounds OK to me, but again I don't want to be the only vote.
(More remarks in the "localized special" thread)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author