From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23650 invoked by alias); 16 Sep 2009 23:57:00 -0000 Received: (qmail 23642 invoked by uid 22791); 16 Sep 2009 23:56:59 -0000 X-SWARE-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_46,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ishtar.tlinx.org (HELO Ishtar.sc.tlinx.org) (64.81.245.74) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Sep 2009 23:56:55 +0000 Received: from [192.168.3.11] (Athena [192.168.3.11]) by Ishtar.sc.tlinx.org (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n8GNuoRI012190 for ; Wed, 16 Sep 2009 16:56:53 -0700 Message-ID: <4AB17B42.4060509@tlinx.org> Date: Wed, 16 Sep 2009 23:57:00 -0000 From: "Linda A. Walsh" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 Lightning/0.9 Thunderbird/2.0.0.22 ThunderBrowse/3.2.6.4 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: gcc@gcc.gnu.org Subject: Re: apple blocks extension References: <636199343f6e2ed0f0a482615b4d1435@mail.smartmobili.com> <4AAFBAF2.3050209@redhat.com> <4AAFBEE5.4080303@verizon.net> <4AB102E6.1080306@codesourcery.com> In-Reply-To: X-Stationery: 0.4.10 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-09/txt/msg00303.txt.bz2 Ian Lance Taylor wrote: > Mark Mitchell writes "I'd certainly check with the FSF > > before betting on that. " > True, though Apple's entry in the copyright file says "assigns past and > future changes" (I checked before the above e-mail). Certainly checking > with the FSF is a good idea. --- Conceptually, it's not 'rocket science' It's just providing some allocated memory to a procedure that it uses as it's memory, (versus memory on stack that goes away when function returns) whenever it is called and for as long as the function stays "active" (hasn't explicitly released it's allocated memory). Perl has had similar things and nearly an entire book(Higher Order Perl, M.J. Dominus) was written about their use (it's a really good book, in my opinion -- it's not really perl specific (though everything is in perl), but I found it provided me with a fairly good understanding of closures as used with named or anonymous functions. I believe the mention it's taken from lisp's lambda operator that did much the same. -l