From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LvCvJ-0001zC-3a for mharc-grub-devel@gnu.org; Sat, 18 Apr 2009 11:57:45 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LvCvH-0001yM-BF for grub-devel@gnu.org; Sat, 18 Apr 2009 11:57:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LvCvC-0001vj-EX for grub-devel@gnu.org; Sat, 18 Apr 2009 11:57:42 -0400 Received: from [199.232.76.173] (port=45298 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LvCvC-0001vf-Ao for grub-devel@gnu.org; Sat, 18 Apr 2009 11:57:38 -0400 Received: from gateway06.websitewelcome.com ([69.93.35.3]:42852) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LvCvB-0001lD-Nu for grub-devel@gnu.org; Sat, 18 Apr 2009 11:57:38 -0400 Received: (qmail 22548 invoked from network); 18 Apr 2009 16:00:07 -0000 Received: from gator297.hostgator.com (74.53.228.114) by gateway06.websitewelcome.com with SMTP; 18 Apr 2009 16:00:07 -0000 Received: from [67.185.177.95] (port=55100 helo=svelte.localnet) by gator297.hostgator.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1LvCv8-00083Q-Se for grub-devel@gnu.org; Sat, 18 Apr 2009 10:57:35 -0500 From: Colin D Bennett To: The development of GRUB 2 Date: Sat, 18 Apr 2009 08:57:33 -0700 User-Agent: KMail/1.11.2 (Linux/2.6.28-11-generic; KDE/4.2.2; x86_64; ; ) References: <1239983697.4383.15.camel@mj> <20090417.161700.16185907.davem@davemloft.net> In-Reply-To: <20090417.161700.16185907.davem@davemloft.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904180857.33301.colin@gibibit.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator297.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - gibibit.com X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: Eliminating nested functions X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Apr 2009 15:57:43 -0000 David Miller wrote on Friday 17 April 2009: > From: Pavel Roskin > Date: Fri, 17 Apr 2009 11:54:57 -0400 > > > I suggest that we eliminate all nested functions. > > I support this completely. Me too. While I like the idea of nested functions, since they are like closures and make a lot of common operations (such as iterating over a collection) a little more concise in the source code, you can certainly implement anything without nested functions that you can with them. Probably passing a pointer to a local structure is the easiest way to do it in most cases if the iteration function needs to access some state, right? Regards, Colin