|
|
Log in / Subscribe / Register

Blocks in C, not C++

Blocks in C, not C++

Posted Sep 16, 2009 21:54 UTC (Wed) by ncm (guest, #165)
In reply to: Blocks in C, not C++ by atai
Parent article: Tornado and Grand Central Dispatch: a quick look

If you're asking whether this "blocks" feature will be added to the Gcc C compiler, I would expect not until it gets very close to standardization as an ISO C feature. I don't know if Apple has placed this blocks thing before the C committee yet, or what the C committee thinks/would think of it. The GNU Gcc developers are very keen on observing relevant standards; proprietary features encourage lock-in. I doubt anybody would bother putting it in before that, given that the Clang C compiler has it.


to post comments

Blocks in C, not C++

Posted Sep 16, 2009 22:46 UTC (Wed) by ncm (guest, #165) [Link] (1 responses)

I will note further that the Lambda feature in C++ has different syntax from Blocks, and there will be strong pressure, particularly from implementers, on the C committee to match the C++ Lambda syntax, i.e. using "[]" where Apple's Blocks uses "^". (Ironically, "[]" looks typographically more like a block, and "^" looks more like a lambda.) I expect Apple to support both syntaxes in the end.

Blocks in C, not C++

Posted Sep 17, 2009 1:29 UTC (Thu) by busterb (subscriber, #560) [Link]

But [] is used by objective C to call methods, so Apple is likely to not support this, at least not OS
X's most-supported language.

Blocks in C, not C++

Posted Sep 18, 2009 8:01 UTC (Fri) by marcH (subscriber, #57642) [Link] (1 responses)

> The GNU Gcc developers are very keen on observing relevant standards; proprietary features encourage lock-in.

Here is a list of non-standard GCC extensions:

http://www.ibm.com/developerworks/linux/library/l-gcc-hacks/

You can probably find a better list; this one took me only 15 seconds to find.

Blocks in C, not C++

Posted Sep 19, 2009 3:22 UTC (Sat) by wahern (subscriber, #37304) [Link]


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds