From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@9fans.net Date: Thu, 3 Sep 2009 09:52:05 +0000 From: comeau@panix.com (Greg Comeau) Message-ID: References: <09650C1A-A4C8-4030-81D6-9AC8913970A2@kix.in>, <8ccc8ba40909020243o275a0340jfea84860a5d2c747@mail.gmail.com> Subject: Re: [9fans] "Blocks" in C Topicbox-Message-UUID: 6095e2b2-ead5-11e9-9d60-3106f5b1d025 In article <8ccc8ba40909020243o275a0340jfea84860a5d2c747@mail.gmail.com>, Francisco J Ballesteros wrote: >On Wed, Sep 2, 2009 at 10:04 AM, Anant Narayanan wrote: >> Mac OS 10.6 introduced a new C compiler frontend (clang), which added >> support for "blocks" in C [1]. Blocks basically add closures and anonymous >> functions to C (and it's derivatives). Full details with examples are in the >> linked article. I think the feature is quite elegant and might be useful in >> cases where you want map/reduce like functionality in C. >> >> How much effort would it be to support a feature similar to blocks in 8c >> (and family)? What are your thoughts on the idea in general? > >IMHO, I'd say C is C and I think it's better to leave >it as it is. If you want a language with extra features you can >probably find one. Just to throw a wrench out: A problem with that, if it is so, is that "Ken C" has already delved there, whether we're looking at it from "C is C" as "K&R C", C89/90, C99, or something in the middle :) -- Greg Comeau / 4.3.10.1 with C++0xisms now in beta! Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90. Comeau C/C++ with Dinkumware's Libraries... Have you tried it?