From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Stephens To: egcs@egcs.cygnus.com Subject: Re: Blocks in g++ ? Date: Thu, 10 Jun 1999 12:03:00 -0000 Message-id: References: <199906101237.NAA05975@phal.cygnus.co.uk> X-SW-Source: 1999-06/msg00360.html Per Bothner writes: > It is worth pointing out that blocks, if implemented as lexical > closures as is the de facto Smalltalk standard, are much more > powerful than Gcc's nested functions, since the latter do *not* > create proper closures. (Creating closures is probably not > practical unless you have garbage collection.) And anyway, g++ doesn't have nested functions, as far as I can see. How about function objects (like those in what used to be called STL)? They provide something a bit like blocks, although not quite the same. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Stephens To: egcs@egcs.cygnus.com Subject: Re: Blocks in g++ ? Date: Wed, 30 Jun 1999 15:43:00 -0000 Message-ID: References: <199906101237.NAA05975@phal.cygnus.co.uk> X-SW-Source: 1999-06n/msg00360.html Message-ID: <19990630154300.vczOA3c_o3QZPpys3Ert2k0wEl1MmR-fDdlkw9bupxo@z> Per Bothner writes: > It is worth pointing out that blocks, if implemented as lexical > closures as is the de facto Smalltalk standard, are much more > powerful than Gcc's nested functions, since the latter do *not* > create proper closures. (Creating closures is probably not > practical unless you have garbage collection.) And anyway, g++ doesn't have nested functions, as far as I can see. How about function objects (like those in what used to be called STL)? They provide something a bit like blocks, although not quite the same.