From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18339 invoked from network); 30 Jun 2008 15:55:28 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 30 Jun 2008 15:55:28 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 18034 invoked from network); 30 Jun 2008 15:05:15 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Jun 2008 15:05:15 -0000 Received: (qmail 16927 invoked by alias); 30 Jun 2008 15:05:11 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25257 Received: (qmail 16917 invoked from network); 30 Jun 2008 15:05:11 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 30 Jun 2008 15:05:11 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [217.69.20.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id D85B980561D1 for ; Mon, 30 Jun 2008 17:04:55 +0200 (CEST) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly28d.srv.mailcontrol.com (MailControl) with ESMTP id m5UF4QcT026326 for ; Mon, 30 Jun 2008 16:04:50 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Mon, 30 Jun 2008 16:04:33 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.2/8.13.4) with ESMTP id m5UF4Xpm015228 for ; Mon, 30 Jun 2008 16:04:33 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.14.2/8.14.2/Submit) with ESMTP id m5UF4XlU015225 for ; Mon, 30 Jun 2008 16:04:33 +0100 Message-Id: <200806301504.m5UF4XlU015225@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: PATCH: anonymous functions, full patch In-reply-to: <080630065737.ZM3284@torch.brasslantern.com> References: <18441.1214488302@csr.com> <9646.1214491732@thecus> <200806261506.m5QF6aCd019139@news01.csr.com> <080626101233.ZM2893@torch.brasslantern.com> <200806261729.m5QHSr5F021201@news01.csr.com> <20080630112722.3e7eb215@news01> <080630065737.ZM3284@torch.brasslantern.com> Comments: In-reply-to Bart Schaefer message dated "Mon, 30 Jun 2008 06:57:37 -0700." Date: Mon, 30 Jun 2008 16:04:32 +0100 From: Peter Stephenson X-OriginalArrivalTime: 30 Jun 2008 15:04:33.0748 (UTC) FILETIME=[9AE83940:01C8DAC2] X-Scanned-By: MailControl A-08-50-03 (www.mailcontrol.com) on 10.68.0.138 X-Virus-Scanned: ClamAV 0.92.1/7586/Mon Jun 30 04:17:49 2008 on bifrost X-Virus-Status: Clean Bart Schaefer wrote: > Seems a little odd, though, to call something a function when you can't > pass any arguments to it. I'm not going to have time to look today, but > how difficult is this? > > function { print $@ } args go here Shouldn't be too horrific, but will require parsing changes, which is why I didn't puruse it. > Two final remarks: One: should this be considered a bug? > > torch% torch% () () > function function> { > function function> print oops > function function> } > zsh: parse error near `\n' > > Once you've got the double empty parens there seems to be nowhere to go > that doesn't end in a parse error. Doesn't really surprise me. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070