Re: [RFC] Apple Blocks extension

2013-11-04 Thread Mike Stump
On Nov 3, 2013, at 8:28 PM, Maxim Kuvyrkov wrote: > Mike, as Obj-C/C++ front-end maintainers, would you be supportive of Blocks > extension implemented for Obj-C/C++ front-ends? Sure. Though, I'd really love a front-end extension to allow one to implement Blocks as a pure library. :-) [ duck

Re: [RFC] Apple Blocks extension

2013-11-04 Thread Mike Stump
On Nov 3, 2013, at 8:28 PM, Maxim Kuvyrkov wrote: > I am considering a project to add Apple's blocks [*] extension to GCC. I have a funny story about that one… I was just about ready to submit the work, the GPLv3 happened. Ah… life goes on.

Re: [RFC] Apple Blocks extension

2013-11-04 Thread Mike Stump
On Nov 3, 2013, at 8:49 PM, pins...@gmail.com wrote: > What benefits does blocks have over nested functions in C and over lambas in > C++? The ability to compile existing code. The ability to compile code that uses system header files on macosx. The ability to use third party libraries on mac

Re: [RFC] Apple Blocks extension

2013-11-04 Thread Jason Merrill
On 11/04/2013 11:34 AM, Joseph S. Myers wrote: On Mon, 4 Nov 2013, Maxim Kuvyrkov wrote: Joseph, Richard, as C front-end maintainers, would you be supportive of Blocks extension implemented for C front-end? Yes. I believe the point (or one of the points) is that at least some system headers

Re: [RFC] Apple Blocks extension

2013-11-04 Thread Torvald Riegel
On Mon, 2013-11-04 at 16:39 +, Joseph S. Myers wrote: > On Mon, 4 Nov 2013, Torvald Riegel wrote: > > > What is the status of this or similar features (eg, lambdas) in ISO C? > > IOW, what was the feedback on the blocks part of > > http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1370.pdf, and

Re: [RFC] Apple Blocks extension

2013-11-04 Thread Joseph S. Myers
On Mon, 4 Nov 2013, Torvald Riegel wrote: > What is the status of this or similar features (eg, lambdas) in ISO C? > IOW, what was the feedback on the blocks part of > http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1370.pdf, and are there > any follow-ups? IMHO, it would be preferable to suppor

Re: [RFC] Apple Blocks extension

2013-11-04 Thread Joseph S. Myers
On Mon, 4 Nov 2013, Maxim Kuvyrkov wrote: > Joseph, Richard, as C front-end maintainers, would you be supportive of > Blocks extension implemented for C front-end? Yes. I believe the point (or one of the points) is that at least some system headers in current Darwin require this extension (mor

Re: [RFC] Apple Blocks extension

2013-11-04 Thread Torvald Riegel
On Mon, 2013-11-04 at 17:28 +1300, Maxim Kuvyrkov wrote: > 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. > > There are many challenges (both technical and copyright) that require work > before a

Re: [RFC] Apple Blocks extension

2013-11-04 Thread David Brown
On 04/11/13 06:18, pins...@gmail.com wrote: > > >> On Nov 3, 2013, at 9:10 PM, Ian Lance Taylor >> wrote: >> >>> On Sun, Nov 3, 2013 at 8:49 PM, wrote: >>> >>> On Nov 3, 2013, at 8:28 PM, Maxim Kuvyrkov wrote: Hi, I am considering a project to add Apple's bl

Re: [RFC] Apple Blocks extension

2013-11-04 Thread Florian Weimer
On 11/04/2013 06:10 AM, Ian Lance Taylor wrote: 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. And they don't need code generation at run time. -- Florian Weimer / Red Hat Product Security Team

Re: [RFC] Apple Blocks extension

2013-11-03 Thread pinskia
> On Nov 3, 2013, at 9:10 PM, Ian Lance Taylor wrote: > >> On Sun, Nov 3, 2013 at 8:49 PM, wrote: >> >> >>> On Nov 3, 2013, at 8:28 PM, Maxim Kuvyrkov wrote: >>> >>> Hi, >>> >>> I am considering a project to add Apple's blocks [*] extension to GCC. I >>> am looking at adding blocks sup

Re: [RFC] Apple Blocks extension

2013-11-03 Thread Ian Lance Taylor
On Sun, Nov 3, 2013 at 8:49 PM, wrote: > > >> On Nov 3, 2013, at 8:28 PM, Maxim Kuvyrkov 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

Re: [RFC] Apple Blocks extension

2013-11-03 Thread pinskia
> On Nov 3, 2013, at 8:28 PM, Maxim Kuvyrkov 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+

[RFC] Apple Blocks extension

2013-11-03 Thread Maxim Kuvyrkov
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. There are many challenges (both technical and copyright) that require work before any patches are ready for review, and I would appreciate indica