From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6838 invoked by alias); 9 Feb 2015 14:35:28 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34484 Received: (qmail 2654 invoked from network); 9 Feb 2015 14:35:16 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f5-b7fc86d0000066b7-1b-54d8c2b2d153 Date: Mon, 09 Feb 2015 14:25:07 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: BUG: $_ empty on null function call Message-id: <20150209142507.348fa42a@pwslap01u.europe.root.pri> In-reply-to: <20150209141026.GB1833@tarsus.local2> References: <54D89C52.6050702@askmicah.net> <20150209122042.35b74995@pwslap01u.europe.root.pri> <20150209141026.GB1833@tarsus.local2> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjluLIzCtJLcpLzFFi42I5/e/4Vd1Nh26EGMy+oWlxsPkhkwOjx6qD H5gCGKO4bFJSczLLUov07RK4Mm70tTMXbGavuHvyM1sDYxNbFyMnh4SAicSR73tZIGwxiQv3 1gPFuTiEBJYySly4PY8RwlnOJDGxv4MZpIpFQFXizrY+VhCbTcBQYuqm2YwgtoiAuMTZtefB JgkLGEg8ufEVbAOvgL3E0o3bwWo4BYwklm2dygoxtJNRoun+DbAEv4C+xNW/n5ggzrCXmHnl DCNEs6DEj8n3wIYyC2hJbN7WxAphy0tsXvOWeQKjwCwkZbOQlM1CUraAkXkVo2hqaXJBcVJ6 rpFecWJucWleul5yfu4mRkgYft3BuPSY1SFGAQ5GJR5eC+XrIUKsiWXFlbmHGCU4mJVEeE2X 3ggR4k1JrKxKLcqPLyrNSS0+xMjEwSnVwKgXtyCcKb2cT0kl917xLIerGmk7N0nnffA3CjNm PrhXjFehJOBaUVJPrskStWu5Yms7mEps5733unVMmPdCmVCc9sQAEQ+3wie7zH6/tfK1D9rq tk7g0ATDcAOb/pIGuaqj/9anXd9vrKB44rp/xuR3T2o/edbs//iwnClYa3H73Jm2sWlPlViK MxINtZiLihMBFbtz2SECAAA= On Mon, 9 Feb 2015 14:10:26 +0000 Daniel Shahaf wrote: > There are some other differences between anonymous functions, e.g., they > don't honor PRINT_EXIT_VALUE: > > Engineering-wise, the ideal solution would be for anonymous and named > functions to share code... though I realize that may be a somewhat > invasive code change. They already do everywhere that doesn't deal with the special argument syntax (Micah's problem) or with immediate execution after a definition. I suspect this may have to do with a different path owing to an optimisation later in the execution path where we make certain assumptions if code is regarded as "simple". This is inevitably a maintenance headache and we've had lots of issues there. By the way, if that means you're interested in looking at the internals, please do... suggestions based on this are much more likely to be useful, for obvious reasons. pws