<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Blocks/Closures For C!</title>
	<atom:link href="http://jens.mooseyard.com/2008/08/blocksclosures-for-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://jens.mooseyard.com/2008/08/blocksclosures-for-c/</link>
	<description>Little boxes made of words, by Jens Alfke</description>
	<lastBuildDate>Sun, 14 Mar 2010 11:32:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Johannes Fortmann</title>
		<link>http://jens.mooseyard.com/2008/08/blocksclosures-for-c/comment-page-1/#comment-2756</link>
		<dc:creator>Johannes Fortmann</dc:creator>
		<pubDate>Fri, 05 Sep 2008 16:22:55 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2008/08/blocksclosures-for-c/#comment-2756</guid>
		<description>Actually, Chris&#039; post is about how Apple has already added Blocks to gcc, and now is adding them to clang. They prototyped them in clang, then implemented them in gcc, and now are adding the final implementation back to clang. If you check out the llvm-gcc svn trunk, you&#039;ll find all the code there (you can even build your own llvm-gcc with working blocks).

Of course, as with all Apple features in gcc, it will take ages till the features get merged into the FSF branch. Mainline gcc still doesn&#039;t have a single objc-2.0 feature merged (and since nobody seems to care enough, I doubt that&#039;ll ever happen). Pity; they&#039;d be just as useful on the other platforms gcc supports.</description>
		<content:encoded><![CDATA[<p>Actually, Chris&#8217; post is about how Apple has already added Blocks to gcc, and now is adding them to clang. They prototyped them in clang, then implemented them in gcc, and now are adding the final implementation back to clang. If you check out the llvm-gcc svn trunk, you&#8217;ll find all the code there (you can even build your own llvm-gcc with working blocks).</p>
<p>Of course, as with all Apple features in gcc, it will take ages till the features get merged into the FSF branch. Mainline gcc still doesn&#8217;t have a single objc-2.0 feature merged (and since nobody seems to care enough, I doubt that&#8217;ll ever happen). Pity; they&#8217;d be just as useful on the other platforms gcc supports.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jens Alfke</title>
		<link>http://jens.mooseyard.com/2008/08/blocksclosures-for-c/comment-page-1/#comment-2755</link>
		<dc:creator>Jens Alfke</dc:creator>
		<pubDate>Thu, 04 Sep 2008 16:21:47 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2008/08/blocksclosures-for-c/#comment-2755</guid>
		<description>Timothy — I would guess that Apple won&#039;t be putting blocks into gcc, since they&#039;re switching over to Clang. (The complexity of gcc, and the GPL license, make it hard to integrate its parser into Xcode in the ways Apple wants to do in the future to support better syntax-driven editing and code refactoring.) But of course gcc is open source, so someone else could add blocks to it if they wanted.

As I understand it, a block pointer is a first-class data type, so you can store them in variables, pass them as arguments, et cetera; whatever you could do with a regular C function pointer.</description>
		<content:encoded><![CDATA[<p>Timothy — I would guess that Apple won&#8217;t be putting blocks into gcc, since they&#8217;re switching over to Clang. (The complexity of gcc, and the GPL license, make it hard to integrate its parser into Xcode in the ways Apple wants to do in the future to support better syntax-driven editing and code refactoring.) But of course gcc is open source, so someone else could add blocks to it if they wanted.</p>
<p>As I understand it, a block pointer is a first-class data type, so you can store them in variables, pass them as arguments, et cetera; whatever you could do with a regular C function pointer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timothy Mowlem</title>
		<link>http://jens.mooseyard.com/2008/08/blocksclosures-for-c/comment-page-1/#comment-2754</link>
		<dc:creator>Timothy Mowlem</dc:creator>
		<pubDate>Thu, 04 Sep 2008 11:44:16 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2008/08/blocksclosures-for-c/#comment-2754</guid>
		<description>Will this feature be added to gcc as well or just to Clang. Also will it be possible to store a block definition into a variable to store and pass as an argument, or will only anonynous blocks be supported?</description>
		<content:encoded><![CDATA[<p>Will this feature be added to gcc as well or just to Clang. Also will it be possible to store a block definition into a variable to store and pass as an argument, or will only anonynous blocks be supported?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jens Alfke</title>
		<link>http://jens.mooseyard.com/2008/08/blocksclosures-for-c/comment-page-1/#comment-2753</link>
		<dc:creator>Jens Alfke</dc:creator>
		<pubDate>Tue, 02 Sep 2008 15:24:26 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2008/08/blocksclosures-for-c/#comment-2753</guid>
		<description>Andy — A block is &lt;i&gt;not&lt;/i&gt; just a function pointer. It&#039;s a &quot;closure&quot; that carries along a reference to the variables in scope at the time the block was created. At runtime that involves an invisible extra parameter, plus some fairly complex bookkeeping to handle the case where the block&#039;s scope exits from the stack while the block is still alive.

Also, I&#039;m pretty certain that the compiler wouldn&#039;t be able to parse an expression like &quot;call_a_block((int y){ print(X+y); })&quot; — it needs some indicator, like &quot;^&quot;, to tell it where the block subexpression begins.</description>
		<content:encoded><![CDATA[<p>Andy — A block is <i>not</i> just a function pointer. It&#8217;s a &#8220;closure&#8221; that carries along a reference to the variables in scope at the time the block was created. At runtime that involves an invisible extra parameter, plus some fairly complex bookkeeping to handle the case where the block&#8217;s scope exits from the stack while the block is still alive.</p>
<p>Also, I&#8217;m pretty certain that the compiler wouldn&#8217;t be able to parse an expression like &#8220;call_a_block((int y){ print(X+y); })&#8221; — it needs some indicator, like &#8220;^&#8221;, to tell it where the block subexpression begins.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Somogyi</title>
		<link>http://jens.mooseyard.com/2008/08/blocksclosures-for-c/comment-page-1/#comment-2752</link>
		<dc:creator>Andy Somogyi</dc:creator>
		<pubDate>Tue, 02 Sep 2008 14:52:54 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2008/08/blocksclosures-for-c/#comment-2752</guid>
		<description>Why do they have to add the &#039;^&#039; operator?, would it not be possible to just create a &#039;block&#039; or anonymous function inline, and pass it to any old C function that takes a function pointer?</description>
		<content:encoded><![CDATA[<p>Why do they have to add the &#8216;^&#8217; operator?, would it not be possible to just create a &#8216;block&#8217; or anonymous function inline, and pass it to any old C function that takes a function pointer?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jens Alfke</title>
		<link>http://jens.mooseyard.com/2008/08/blocksclosures-for-c/comment-page-1/#comment-2751</link>
		<dc:creator>Jens Alfke</dc:creator>
		<pubDate>Mon, 01 Sep 2008 18:51:29 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2008/08/blocksclosures-for-c/#comment-2751</guid>
		<description>Carlos — Blocks are being added to the C compiler; there&#039;s nothing specific to Objective-C about them, so they could be used in arbitrary C code, as long as you&#039;re compiling it with Clang.</description>
		<content:encoded><![CDATA[<p>Carlos — Blocks are being added to the C compiler; there&#8217;s nothing specific to Objective-C about them, so they could be used in arbitrary C code, as long as you&#8217;re compiling it with Clang.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charles</title>
		<link>http://jens.mooseyard.com/2008/08/blocksclosures-for-c/comment-page-1/#comment-2750</link>
		<dc:creator>charles</dc:creator>
		<pubDate>Mon, 01 Sep 2008 13:48:47 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2008/08/blocksclosures-for-c/#comment-2750</guid>
		<description>Thanks, it will be very interesting to follow this &#039;thread&#039;. There is apparently not much out there about Blocks, so maybe the readers of this post will be interested in &lt;a href=&quot;http://www.macresearch.org/cocoa-scientists-part-xxvii-getting-closure-objective-c&quot; rel=&quot;nofollow&quot;&gt;a post on macresearch.org&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Thanks, it will be very interesting to follow this &#8216;thread&#8217;. There is apparently not much out there about Blocks, so maybe the readers of this post will be interested in <a href="http://www.macresearch.org/cocoa-scientists-part-xxvii-getting-closure-objective-c" rel="nofollow">a post on macresearch.org</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos</title>
		<link>http://jens.mooseyard.com/2008/08/blocksclosures-for-c/comment-page-1/#comment-2749</link>
		<dc:creator>Carlos</dc:creator>
		<pubDate>Mon, 01 Sep 2008 07:51:58 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2008/08/blocksclosures-for-c/#comment-2749</guid>
		<description>It seems very interesting. Are Blocks being designed only for Objetive-C, or there will be an ANSI-C version too?</description>
		<content:encoded><![CDATA[<p>It seems very interesting. Are Blocks being designed only for Objetive-C, or there will be an ANSI-C version too?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Onyschuk</title>
		<link>http://jens.mooseyard.com/2008/08/blocksclosures-for-c/comment-page-1/#comment-2748</link>
		<dc:creator>Mark Onyschuk</dc:creator>
		<pubDate>Sun, 31 Aug 2008 13:10:56 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2008/08/blocksclosures-for-c/#comment-2748</guid>
		<description>Spectacular news! I&#039;d long ago given up hope that we&#039;d see this kind of fundamental change in Objective C. The relatively modest changes to the language introduced in Objective C 2.0 seemed to cement that for me.

Mark</description>
		<content:encoded><![CDATA[<p>Spectacular news! I&#8217;d long ago given up hope that we&#8217;d see this kind of fundamental change in Objective C. The relatively modest changes to the language introduced in Objective C 2.0 seemed to cement that for me.</p>
<p>Mark</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->