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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham
autolearn_force=no version=3.4.4
Received: (qmail 29021 invoked from network); 22 Nov 2022 10:18:21 -0000
Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368)
by inbox.vuxu.org with ESMTPUTF8; 22 Nov 2022 10:18:21 -0000
ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1669112301;
b=TIKfIHd/tDqtE4pjsu+4F/pykl1oC8q4t4VorW9GLxN2pZ+hTKr6OGpA0IuruCunSzxUj5wIKv
sH1KpeHbD7MGjyEl0B2ZsaniGuuWdADmwkCEMHQBy4/kB1Xp1byFi9dcJqgyBEtw39uM56iXWq
n8K1C/Xm4mOthys/O++9iMx36M22hF8N1rF2Cdit/QsFnQz8MahfupqMwzyI3HJ0eP8pMPJQGS
Ne0Z5kBjiQeZlJfstOoptQAMCBrFgwAHACEqiWa69N4r5DPYXlNy0ury4bfHkQGTXdJNdGparp
U/3jSukCN9RfLKEQ7mXvqG7YhIZP2jzIdTemI2QmPva1VQ==;
ARC-Authentication-Results: i=1; zsh.org;
iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97;
dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256;
dmarc=pass header.from=ntlworld.com;
arc=none
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1669112301;
bh=wCQ8tvGueW14AYt2hxSUrg+Tmde7uY3RxNT4zzoekl0=;
h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help:
List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:
References:In-Reply-To:Message-ID:To:From:Date:DKIM-Signature:
DKIM-Signature;
b=dQF7A6QFMeyp70QwrXC006dy101iQWcK9JbJt1BXqeeK3mhYCM56sEvuU0a98hIqccti8x/TwF
GD/RgcQ21GbnpIta6rcusOQNwnrPW/GeEVikkQNVANNXOovOVN9VLXPMuK2CYmEmD3013jETDT
z/rPoN4NTXiFlTwsR9U5hgsjUb76jkd+nob1uxn38gWRncbbBLWHFgSDRFAgxu99C4R4xoF+8k
vRTpBomsvyb+yvuxjO7lsY8TcSKUhnBrrwE0pVa1Zx/EVWyZnZmIry1qpSs0k+t0kEUr5R3hV/
xzgRUtgsTyXIDl7OmNtOQGeSh9X8PMdn8yXivinTLp4BrA==;
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org;
s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:
List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding:
Content-Type:MIME-Version:Subject:References:In-Reply-To:Message-ID:To:From:
Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:
Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID;
bh=wCQ8tvGueW14AYt2hxSUrg+Tmde7uY3RxNT4zzoekl0=; b=UnUiXpys08RsYAHsd3K3qk+wQD
gR6BJNsVwcogeh6gpjz0hMVF8XcWo5N92O05nCtM/BdlNRl3ZMqnwfB66FD9mV8jVavWSmCFdzz2f
evmEfE6zref2X+0cXYOLoW6BfwyKDcDyGrKIC/xABo87ZMNZwlApP57NGn1zPbnIRKBeqQyVA4HPq
Q43RTVfayt1uDHNHhhKPkNMK6cKu8ShapJ6bb3ooHWexJk8PrUfzzok3Ha2t6oeIlp/+vKWD2Hqs3
2wBVPapCGQh0horVqbf/JqGJ174bmo9sfskV8JvspD0vdlEtCRa21et/w21toVM13z3eIYf+dh4Sh
CKH79a4w==;
Received: by zero.zsh.org with local
id 1oxQM8-0002dz-Kd;
Tue, 22 Nov 2022 10:18:20 +0000
Authentication-Results: zsh.org;
iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97;
dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256;
dmarc=pass header.from=ntlworld.com;
arc=none
Received: from smtpq2.tb.ukmail.iss.as9143.net ([212.54.57.97]:52904)
by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
id 1oxQLS-0001l0-PQ;
Tue, 22 Nov 2022 10:17:41 +0000
Received: from [212.54.57.82] (helo=smtp3.tb.ukmail.iss.as9143.net)
by smtpq2.tb.ukmail.iss.as9143.net with esmtp (Exim 4.90_1)
(envelope-from
)
id 1oxQLS-0005Ad-6U
for zsh-workers@zsh.org; Tue, 22 Nov 2022 11:17:38 +0100
Received: from oxbe19.tb.ukmail.iss.as9143.net ([172.25.160.150])
by smtp3.tb.ukmail.iss.as9143.net with ESMTP
id xQLRov3gFsyQZxQLSoajtn; Tue, 22 Nov 2022 11:17:38 +0100
X-Env-Mailfrom: p.w.stephenson@ntlworld.com
X-Env-Rcptto: zsh-workers@zsh.org
X-SourceIP: 172.25.160.150
X-CNFS-Analysis: v=2.4 cv=W/8r6Dak c=1 sm=1 tr=0 ts=637ca1c2 cx=a_exe
a=5CzvcAr/sXcdrkwznnUi5w==:117 a=1DWFKdCB1IcA:10 a=IkcTkHD0fZMA:10
a=ZjyAdWuDOD4A:10 a=pGLkceISAAAA:8 a=RUBTQxR2NXfdRnn2b6EA:9 a=QEXdDO2ut3YA:10
X-Authenticated-Sender: p.w.stephenson@ntlworld.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com;
s=meg.feb2017; t=1669112258;
bh=wCQ8tvGueW14AYt2hxSUrg+Tmde7uY3RxNT4zzoekl0=;
h=Date:From:To:In-Reply-To:References:Subject;
b=bGDhf1XFYBQY9kXWCqvcOrAeRhiaaJGEq6oWr2ck303zdVXO39XgveqhtO6Pc3dTg
6nmcPZ/pWXoIVPZSQKHo95aBjIel6A3pSXQT8itxTmwDUAj7WhLjOvqEv3h2JuuA5C
rOY26TjDfs1B23roc2YuzgV+d31UaHSs/4CKSi7rbfHAkW9Gsf7FjiSY6v6+hY8Jso
z8Z5nkFpvJ210d8IE1nTPINkzgVsLnmSgjXfhLI/CqiECRwJ4eHMlv6EM2+cPSh93t
tcy+1sFtUMs96gHuNAyHQm0BJsLu31Y4GLQrRbsGAH0DZpA+Ei8H0oX7Hf2cNEsqgS
+faIlAg9A9nnQ==
Date: Tue, 22 Nov 2022 10:17:37 +0000 (GMT)
From: Peter Stephenson
To: Philippe Altherr , zsh-workers@zsh.org
Message-ID: <1563682955.1031478.1669112257901@mail.virginmedia.com>
In-Reply-To:
References:
<230a78bb-fa97-4f3a-94a2-86982316274b@app.fastmail.com>
Subject: Re: [PATCH] Fix ERR_EXIT behavior in function calls and "always"
statements
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Priority: 3
Importance: Normal
X-Mailer: Open-Xchange Mailer
X-Originating-IP: 147.161.224.167
X-Originating-Client: open-xchange-appsuite
X-CMAE-Envelope: MS4xfLIuy9Ru+2mkxxBgtmp2Ch9mTlsh/8IsuOpeme41T/d/0dznCoHhUebYjqACn6qXrXl1vSBj1GKpXX9ocZTIp+uFi6rnQa/MyGJrcS0EdFTevjck6ZNg
Oym8SmcD56Ecks0A03gimfIxi11XlCTiSTMTipMBpZIUd4N6tw+110bXgOlmlTV7/xEDAUipk/0AQv0kWvVsn4PXZ/i1R/WrrsTM1auU3axni8B0Xcsj24mT
v1W7r1h3JyrbTdF2Esvr32mx7m0IJTAxQnjlzXx87VM=
X-Seq: 51023
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:
On 22/11/2022 02:52 Philippe Altherr wrote:
> Currently anonymous functions behave like function calls. My patches
> don't change that but they change/fix cases F and I to behave as mandated
> by POSIX. If anonymous functions are changed to behave like compound
> commands then anonymous functions behave as if the code was inlined.
> This changes the behavior of case E, which currently exits.
On the whole I think keeping anonymous functions behaving like other functions
is probably sensible, though we could draw better attention to this unusual
degree of consistency somewhere in the documentation.
I don't think there's a killer argument for this but if you're using an
anonymous function it's because you need some form of function behaviour and
my own inclination would be to continue to provide essentially the whole of it,
hopefully also limiting special cases in the source code.
(One possible comparison is Ruby, where you consistently either get "yield
semantics" or "function semantics", though comparing zsh with Ruby feels
wrong at pretty much every other level so this is a very shallow similarity
indeed.)
pws