<?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: Objective-C 3.0</title>
	<atom:link href="http://losingfight.com/blog/2006/10/25/objective-c-30/feed/" rel="self" type="application/rss+xml" />
	<link>http://losingfight.com/blog/2006/10/25/objective-c-30/</link>
	<description>software engineering on the mac</description>
	<lastBuildDate>Thu, 24 Dec 2009 13:45:24 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Psycho</title>
		<link>http://losingfight.com/blog/2006/10/25/objective-c-30/comment-page-1/#comment-291</link>
		<dc:creator>Psycho</dc:creator>
		<pubDate>Thu, 06 Nov 2008 10:41:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.losingfight.com/blog/2006/10/25/objective-c-30/#comment-291</guid>
		<description>No need for this feature now, no need to create a new version of Objective-C.

Now,  you have C-blocks. Apple added support for a new feature : the blocks directly in C (in the llvm-gcc/clang compilers), everything you want is managed here... Except blocks aren&#039;t functions so you can add it to a class definition.

However, to add methods to a class at runtime, it already exists in the ObjC 2.0 runtime, not through categories but through runtime functions of Objective-C. You can add a method, remove a method, exchange method implementations, etc.</description>
		<content:encoded><![CDATA[<p>No need for this feature now, no need to create a new version of Objective-C.</p>
<p>Now,  you have C-blocks. Apple added support for a new feature : the blocks directly in C (in the llvm-gcc/clang compilers), everything you want is managed here&#8230; Except blocks aren&#8217;t functions so you can add it to a class definition.</p>
<p>However, to add methods to a class at runtime, it already exists in the ObjC 2.0 runtime, not through categories but through runtime functions of Objective-C. You can add a method, remove a method, exchange method implementations, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tyler</title>
		<link>http://losingfight.com/blog/2006/10/25/objective-c-30/comment-page-1/#comment-290</link>
		<dc:creator>tyler</dc:creator>
		<pubDate>Sat, 20 Oct 2007 04:45:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.losingfight.com/blog/2006/10/25/objective-c-30/#comment-290</guid>
		<description>http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html#//apple_ref/c/func/objc_addClass

note comment in the sample code:

    // Allocate empty method lists.
    // We can add methods later.
    //</description>
		<content:encoded><![CDATA[<p><a href="http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html#//apple_ref/c/func/objc_addClass" rel="nofollow">http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html#//apple_ref/c/func/objc_addClass</a></p>
<p>note comment in the sample code:</p>
<p>    // Allocate empty method lists.<br />
    // We can add methods later.<br />
    //</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Aufflick</title>
		<link>http://losingfight.com/blog/2006/10/25/objective-c-30/comment-page-1/#comment-289</link>
		<dc:creator>Mark Aufflick</dc:creator>
		<pubDate>Wed, 25 Apr 2007 13:37:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.losingfight.com/blog/2006/10/25/objective-c-30/#comment-289</guid>
		<description>Closures would be hard in Objective-C because it&#039;s still, at its core, C. C uses a stack for holding the contexts of the chain of function calls and so has no way to &#039;hang on to&#039; the context for a closure after the parent function has returned.

There is an excellent message on comp.lang.objective-c that explains this better:

http://groups.google.com/group/comp.lang.objective-c/msg/37b994ca69cde086

Certainly not impossible, but a whole lot of changing at the core of the language would be required.</description>
		<content:encoded><![CDATA[<p>Closures would be hard in Objective-C because it&#8217;s still, at its core, C. C uses a stack for holding the contexts of the chain of function calls and so has no way to &#8216;hang on to&#8217; the context for a closure after the parent function has returned.</p>
<p>There is an excellent message on comp.lang.objective-c that explains this better:</p>
<p><a href="http://groups.google.com/group/comp.lang.objective-c/msg/37b994ca69cde086" rel="nofollow">http://groups.google.com/group/comp.lang.objective-c/msg/37b994ca69cde086</a></p>
<p>Certainly not impossible, but a whole lot of changing at the core of the language would be required.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://losingfight.com/blog/2006/10/25/objective-c-30/comment-page-1/#comment-288</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Thu, 26 Oct 2006 17:45:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.losingfight.com/blog/2006/10/25/objective-c-30/#comment-288</guid>
		<description>Hey Scott,

That&#039;s great info, I didn&#039;t know you could actually add a single method dynamically. It does futher my belief that what I&#039;ve proposed is feasible. I was worried about my hand-waving when it came to calling anonymous functions.

However, it&#039;s still not as cool as closures. :-)</description>
		<content:encoded><![CDATA[<p>Hey Scott,</p>
<p>That&#8217;s great info, I didn&#8217;t know you could actually add a single method dynamically. It does futher my belief that what I&#8217;ve proposed is feasible. I was worried about my hand-waving when it came to calling anonymous functions.</p>
<p>However, it&#8217;s still not as cool as closures. <img src='http://losingfight.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://losingfight.com/blog/2006/10/25/objective-c-30/comment-page-1/#comment-287</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Thu, 26 Oct 2006 17:41:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.losingfight.com/blog/2006/10/25/objective-c-30/#comment-287</guid>
		<description>Hey Joachim,

After writing this article I was convinced that closures are completely doable in Objective-C, albeit with the couple of gotchas that I outlined. I even started wondering if I should download the source to gcc and start tinkering. :-)

It would be interesting if someone smarter than I could comment on if I totally missed the boat, and suggested something that&#039;s not implementable.</description>
		<content:encoded><![CDATA[<p>Hey Joachim,</p>
<p>After writing this article I was convinced that closures are completely doable in Objective-C, albeit with the couple of gotchas that I outlined. I even started wondering if I should download the source to gcc and start tinkering. <img src='http://losingfight.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>It would be interesting if someone smarter than I could comment on if I totally missed the boat, and suggested something that&#8217;s not implementable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://losingfight.com/blog/2006/10/25/objective-c-30/comment-page-1/#comment-286</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Thu, 26 Oct 2006 17:37:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.losingfight.com/blog/2006/10/25/objective-c-30/#comment-286</guid>
		<description>Hey Keith,

You&#039;re right about fast array enumeration being in Objective-C 2.0. My choice of examples for closures probably wasn&#039;t the best one. Fortunately there are lots of better examples of the power of closures out on the web.</description>
		<content:encoded><![CDATA[<p>Hey Keith,</p>
<p>You&#8217;re right about fast array enumeration being in Objective-C 2.0. My choice of examples for closures probably wasn&#8217;t the best one. Fortunately there are lots of better examples of the power of closures out on the web.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith Duncan</title>
		<link>http://losingfight.com/blog/2006/10/25/objective-c-30/comment-page-1/#comment-285</link>
		<dc:creator>Keith Duncan</dc:creator>
		<pubDate>Thu, 26 Oct 2006 11:57:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.losingfight.com/blog/2006/10/25/objective-c-30/#comment-285</guid>
		<description>Yeah I think I missed the point of what you were saying when I read it this morning, I was mulling it over in my head durning my driving lesson (the instructor was less than pleased with my concentration) and now see what your getting at - a driving lesson evey day for a week can really tire you out!</description>
		<content:encoded><![CDATA[<p>Yeah I think I missed the point of what you were saying when I read it this morning, I was mulling it over in my head durning my driving lesson (the instructor was less than pleased with my concentration) and now see what your getting at &#8211; a driving lesson evey day for a week can really tire you out!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joachim Bengtsson</title>
		<link>http://losingfight.com/blog/2006/10/25/objective-c-30/comment-page-1/#comment-284</link>
		<dc:creator>Joachim Bengtsson</dc:creator>
		<pubDate>Thu, 26 Oct 2006 09:12:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.losingfight.com/blog/2006/10/25/objective-c-30/#comment-284</guid>
		<description>Closures in a compiled language would be beyond awesome (although I&#039;d guess it&#039;s already been done by some language long forgotten...). And with a real syntax, yes please! Not all the mess with &quot;Define a function in the global scope, get a function pointer from that, and inject that into the runtime&quot;...

However, perhaps all that&#039;s needed is a preprocessor... ;) Next summer project here I come! (It&#039;s funny that Objc started as a preprocessor...) Although that wouldn&#039;t preserve locals, hmm...</description>
		<content:encoded><![CDATA[<p>Closures in a compiled language would be beyond awesome (although I&#8217;d guess it&#8217;s already been done by some language long forgotten&#8230;). And with a real syntax, yes please! Not all the mess with &#8220;Define a function in the global scope, get a function pointer from that, and inject that into the runtime&#8221;&#8230;</p>
<p>However, perhaps all that&#8217;s needed is a preprocessor&#8230; <img src='http://losingfight.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Next summer project here I come! (It&#8217;s funny that Objc started as a preprocessor&#8230;) Although that wouldn&#8217;t preserve locals, hmm&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Stevenson</title>
		<link>http://losingfight.com/blog/2006/10/25/objective-c-30/comment-page-1/#comment-283</link>
		<dc:creator>Scott Stevenson</dc:creator>
		<pubDate>Thu, 26 Oct 2006 08:58:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.losingfight.com/blog/2006/10/25/objective-c-30/#comment-283</guid>
		<description>The future is here now. Categories can load at runtime, and you can also &lt;a href=&quot;http://theocacao.com/document.page/327&quot; rel=&quot;nofollow&quot;&gt;add methods at runtime&lt;/a&gt;. You do have to get your hands messy, though.

Great post, though.</description>
		<content:encoded><![CDATA[<p>The future is here now. Categories can load at runtime, and you can also <a href="http://theocacao.com/document.page/327" rel="nofollow">add methods at runtime</a>. You do have to get your hands messy, though.</p>
<p>Great post, though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith Duncan</title>
		<link>http://losingfight.com/blog/2006/10/25/objective-c-30/comment-page-1/#comment-282</link>
		<dc:creator>Keith Duncan</dc:creator>
		<pubDate>Thu, 26 Oct 2006 08:03:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.losingfight.com/blog/2006/10/25/objective-c-30/#comment-282</guid>
		<description>Just a little note on the closures you mention, if you read the web documentation on Obj-C 2.0 it features fast enumeration - faster than an NSEnumberator. So unless im missing something this already covered this in version two by using for(id someObject in array) NSLog(@&quot;%@&quot;, [someObject description]);</description>
		<content:encoded><![CDATA[<p>Just a little note on the closures you mention, if you read the web documentation on Obj-C 2.0 it features fast enumeration &#8211; faster than an NSEnumberator. So unless im missing something this already covered this in version two by using for(id someObject in array) NSLog(@&#8221;%@&#8221;, [someObject description]);</p>
]]></content:encoded>
	</item>
</channel>
</rss>
