> On Nov 3, 2013, at 9:10 PM, Ian Lance Taylor <i...@google.com> wrote:
> 
>> On Sun, Nov 3, 2013 at 8:49 PM,  <pins...@gmail.com> wrote:
>> 
>> 
>>> On Nov 3, 2013, at 8:28 PM, Maxim Kuvyrkov <ma...@kugelworks.com> wrote:
>>> 
>>> Hi,
>>> 
>>> I am considering a project to add Apple's blocks [*] extension to GCC.  I 
>>> am looking at adding blocks support to C, C++ and Obj-C/C++ front-ends.
>> 
>> What benefits does blocks have over nested functions in C and over lambas in 
>> C++?  I think it is wrong to add another extension if only to be compatible 
>> with clang.  I also think the blocks extension are less useful than nested 
>> functions and lambas.  The question really should be why support something 
>> which has no advantage to them to what is already existing.  I think it was 
>> wrong for apple to add them in the first place.
> 
> Clang's blocks are more powerful than GCC's nested functions, because
> blocks may be placed on the heap, and therefore returned from a
> function.

Actually I think it is less powerful since it is a copy rather than a 
reference.  Then again lambas can be do both.


> 
> Ian

Reply via email to