<?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, readability, and language design</title>
	<atom:link href="http://kuwamoto.org/2008/07/02/objective-c-readability-and-language-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://kuwamoto.org/2008/07/02/objective-c-readability-and-language-design/</link>
	<description>music, technology, interfaces, people</description>
	<lastBuildDate>Mon, 19 Oct 2009 16:37:14 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: sho</title>
		<link>http://kuwamoto.org/2008/07/02/objective-c-readability-and-language-design/comment-page-1/#comment-266065</link>
		<dc:creator>sho</dc:creator>
		<pubDate>Tue, 24 Mar 2009 22:40:16 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=147#comment-266065</guid>
		<description>Ok.. after a quick look, MacRuby seems very exciting, but perhaps not 100% ready for commercial use. It will be interesting to see how it progresses.</description>
		<content:encoded><![CDATA[<p>Ok.. after a quick look, MacRuby seems very exciting, but perhaps not 100% ready for commercial use. It will be interesting to see how it progresses.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sho</title>
		<link>http://kuwamoto.org/2008/07/02/objective-c-readability-and-language-design/comment-page-1/#comment-266061</link>
		<dc:creator>sho</dc:creator>
		<pubDate>Tue, 24 Mar 2009 22:32:36 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=147#comment-266061</guid>
		<description>I&#039;d heard burblings about Ruby and Cocoa, but I&#039;d always assumed that it was a standard Ruby runtime communicating with an Objective C library. 

I&#039;ll have to check it out!</description>
		<content:encoded><![CDATA[<p>I&#8217;d heard burblings about Ruby and Cocoa, but I&#8217;d always assumed that it was a standard Ruby runtime communicating with an Objective C library. </p>
<p>I&#8217;ll have to check it out!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: emil tin</title>
		<link>http://kuwamoto.org/2008/07/02/objective-c-readability-and-language-design/comment-page-1/#comment-266058</link>
		<dc:creator>emil tin</dc:creator>
		<pubDate>Tue, 24 Mar 2009 22:23:59 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=147#comment-266058</guid>
		<description>Let&#039;s be honest, ObjC is a great language, but the syntax is just ugly and painful.

With MacRuby, Apple is making ruby a real option for writing Cocoa apps. They&#039;ve rewritten the ruby runtime so it uses the ObjC runtime. All ruby objects are ObjC objects (NSObject), and can be passed between ruby and objc without conversion, and you can use Cocoa, callbacks, everything. But with ruby syntax.

MacRuby includes HotCocoa that gives you nice ruby ways to do many of the common things in Cocoa, like instantiating GUI objects, etc, using shorter method and constant names, easy defaults and ideomatic ruby constructs.

Ruby and ObjC play very well togther, but ruby syntax is just so much more pleasant.</description>
		<content:encoded><![CDATA[<p>Let&#8217;s be honest, ObjC is a great language, but the syntax is just ugly and painful.</p>
<p>With MacRuby, Apple is making ruby a real option for writing Cocoa apps. They&#8217;ve rewritten the ruby runtime so it uses the ObjC runtime. All ruby objects are ObjC objects (NSObject), and can be passed between ruby and objc without conversion, and you can use Cocoa, callbacks, everything. But with ruby syntax.</p>
<p>MacRuby includes HotCocoa that gives you nice ruby ways to do many of the common things in Cocoa, like instantiating GUI objects, etc, using shorter method and constant names, easy defaults and ideomatic ruby constructs.</p>
<p>Ruby and ObjC play very well togther, but ruby syntax is just so much more pleasant.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OfficialTrash</title>
		<link>http://kuwamoto.org/2008/07/02/objective-c-readability-and-language-design/comment-page-1/#comment-257238</link>
		<dc:creator>OfficialTrash</dc:creator>
		<pubDate>Tue, 03 Mar 2009 21:07:48 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=147#comment-257238</guid>
		<description>@8: &quot;I, too, find myself using stringWithFormat where I should probably use stringByAppendingString, but I’m bothered by the fact that I would choose one over the other over readability as opposed to picking the best method for the job.&quot;

stringWithFormat vs. stringByAppendingString is purely a readability issue. As far as efficiency goes ObjC is compiled and good ol&#039; g++ handles the efficiency part.

As far as the article goes, I think JavaScript syntax can be far more annoying than ObjC. Anon functions and closures get pretty ugly (like regex ugly).</description>
		<content:encoded><![CDATA[<p>@8: &#8220;I, too, find myself using stringWithFormat where I should probably use stringByAppendingString, but I’m bothered by the fact that I would choose one over the other over readability as opposed to picking the best method for the job.&#8221;</p>
<p>stringWithFormat vs. stringByAppendingString is purely a readability issue. As far as efficiency goes ObjC is compiled and good ol&#8217; g++ handles the efficiency part.</p>
<p>As far as the article goes, I think JavaScript syntax can be far more annoying than ObjC. Anon functions and closures get pretty ugly (like regex ugly).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sho</title>
		<link>http://kuwamoto.org/2008/07/02/objective-c-readability-and-language-design/comment-page-1/#comment-204137</link>
		<dc:creator>sho</dc:creator>
		<pubDate>Mon, 07 Jul 2008 13:56:37 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=147#comment-204137</guid>
		<description>Cool emacs macro. I used to use emacs exclusively, but not these days. Also, in situations where you have to supply an arg, doesn&#039;t it get a bit hard figuring out what the count should be? Maybe that situation just doesn&#039;t come up that often...

Long names: I kind of agree about the meaningful names, but my personal opinion is that shorter names would have been better for the most commonly used items. Also, the fact that type/usage information is tacked onto every argument sometimes adds unneeded (IMHO) words.

For example, instead of &lt;code&gt;stringByReplacingOccurancesOfString:withString&lt;/code&gt;, I would prefer something like &lt;code&gt;replace:with&lt;/code&gt;. I know it doesn&#039;t fit the convention of adding type and usage information to the names/arguments, but it&#039;s not like that convention is universally followed in the first place. At the very least, couldn&#039;t it be &lt;code&gt;stringByReplacing:with&lt;/code&gt;?

For less commonly used classes/methods, I am fine with longer names.

As for dabbrev (and code hinting in general), it&#039;s a life-saver, but it doesn&#039;t help when you have a long common prefix for method names (e.g., &#039;stringBy&#039; or &#039;dictionaryBy&#039; or &#039;NSMutable&#039;). Maybe I am a lazier typist than most. :-)

I, too, find myself using stringWithFormat where I should probably use stringByAppendingString, but I&#039;m bothered by the fact that I would choose one over the other over readability as opposed to picking the best method for the job. (come to think of it, stringWithFormat might be more efficient in this case, since the stringByAppendingString method would require an intermediate string to be created.. hmm...)</description>
		<content:encoded><![CDATA[<p>Cool emacs macro. I used to use emacs exclusively, but not these days. Also, in situations where you have to supply an arg, doesn&#8217;t it get a bit hard figuring out what the count should be? Maybe that situation just doesn&#8217;t come up that often&#8230;</p>
<p>Long names: I kind of agree about the meaningful names, but my personal opinion is that shorter names would have been better for the most commonly used items. Also, the fact that type/usage information is tacked onto every argument sometimes adds unneeded (IMHO) words.</p>
<p>For example, instead of <code>stringByReplacingOccurancesOfString:withString</code>, I would prefer something like <code>replace:with</code>. I know it doesn&#8217;t fit the convention of adding type and usage information to the names/arguments, but it&#8217;s not like that convention is universally followed in the first place. At the very least, couldn&#8217;t it be <code>stringByReplacing:with</code>?</p>
<p>For less commonly used classes/methods, I am fine with longer names.</p>
<p>As for dabbrev (and code hinting in general), it&#8217;s a life-saver, but it doesn&#8217;t help when you have a long common prefix for method names (e.g., &#8217;stringBy&#8217; or &#8216;dictionaryBy&#8217; or &#8216;NSMutable&#8217;). Maybe I am a lazier typist than most. :-)</p>
<p>I, too, find myself using stringWithFormat where I should probably use stringByAppendingString, but I&#8217;m bothered by the fact that I would choose one over the other over readability as opposed to picking the best method for the job. (come to think of it, stringWithFormat might be more efficient in this case, since the stringByAppendingString method would require an intermediate string to be created.. hmm&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: website design</title>
		<link>http://kuwamoto.org/2008/07/02/objective-c-readability-and-language-design/comment-page-1/#comment-204075</link>
		<dc:creator>website design</dc:creator>
		<pubDate>Mon, 07 Jul 2008 05:58:08 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=147#comment-204075</guid>
		<description>&gt; Reading this syntax isn’t bad, but writing it is a pain. Every time you want to add a new method call at the end, you have to go all the way to the beginning of the line to add an open square bracket. 

(defun objc-wrap-brackets (&amp;optional count) (interactive &quot;*p&quot;) (backward-up-list count) (insert &quot;[&quot;) (forward-sexp +1) (save-excursion (insert &quot;]&quot;)) (just-one-space)) 

&gt; Long names For typing them: M-x dabbrev, for reading: I agree. However, I prefer meaningful names over arc&#039;s or perl&#039;s line noise. 

&gt; Strings and collections [NSString stringWithFormat: @&quot;The file %@ could not be found&quot;, filename]; 

&gt; Frankenstein - Not 100% object-oriented Well, that&#039;s what you get if you tack on stuff to C. Ways to add new syntactic abstractions would be nice to have, I agree.</description>
		<content:encoded><![CDATA[<p>&gt; Reading this syntax isn’t bad, but writing it is a pain. Every time you want to add a new method call at the end, you have to go all the way to the beginning of the line to add an open square bracket. </p>
<p>(defun objc-wrap-brackets (&amp;optional count) (interactive &#8220;*p&#8221;) (backward-up-list count) (insert &#8220;[") (forward-sexp +1) (save-excursion (insert "]&#8220;)) (just-one-space)) </p>
<p>&gt; Long names For typing them: M-x dabbrev, for reading: I agree. However, I prefer meaningful names over arc&#8217;s or perl&#8217;s line noise. </p>
<p>&gt; Strings and collections [NSString stringWithFormat: @"The file %@ could not be found", filename]; </p>
<p>&gt; Frankenstein &#8211; Not 100% object-oriented Well, that&#8217;s what you get if you tack on stuff to C. Ways to add new syntactic abstractions would be nice to have, I agree.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Corfield</title>
		<link>http://kuwamoto.org/2008/07/02/objective-c-readability-and-language-design/comment-page-1/#comment-202977</link>
		<dc:creator>Sean Corfield</dc:creator>
		<pubDate>Thu, 03 Jul 2008 16:25:02 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=147#comment-202977</guid>
		<description>Objective-C is a great concept as a language but I agree that the bracket syntax is hard work. I&#039;m not sure of the origins but maybe it took a signal from Smalltalk&#039;s use of brackets for code blocks? (Smalltalk does not need brackets for message passing in general and is much, much easier to read because of it)

@JulesLt, as a former member of the ANSI C++ Standards Committee I&#039;ll say that we worked very hard to allow all C programs to have equivalent meaning in C++ because we valued compatibility. We didn&#039;t even drop support for implicit int until the ANSI C committee dropped it! However, one of the guiding principles for C++ was &quot;as close to C as possible but no closer&quot; and the strictness of the C++ type system meant there had to be some incompatibilities (as well as some syntactic clarifications, as I recall - it was a decade ago).</description>
		<content:encoded><![CDATA[<p>Objective-C is a great concept as a language but I agree that the bracket syntax is hard work. I&#8217;m not sure of the origins but maybe it took a signal from Smalltalk&#8217;s use of brackets for code blocks? (Smalltalk does not need brackets for message passing in general and is much, much easier to read because of it)</p>
<p>@JulesLt, as a former member of the ANSI C++ Standards Committee I&#8217;ll say that we worked very hard to allow all C programs to have equivalent meaning in C++ because we valued compatibility. We didn&#8217;t even drop support for implicit int until the ANSI C committee dropped it! However, one of the guiding principles for C++ was &#8220;as close to C as possible but no closer&#8221; and the strictness of the C++ type system meant there had to be some incompatibilities (as well as some syntactic clarifications, as I recall &#8211; it was a decade ago).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sho</title>
		<link>http://kuwamoto.org/2008/07/02/objective-c-readability-and-language-design/comment-page-1/#comment-202964</link>
		<dc:creator>sho</dc:creator>
		<pubDate>Thu, 03 Jul 2008 15:04:18 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=147#comment-202964</guid>
		<description>Felix: I&#039;m learning Objective C for the only thing it&#039;s really good for these days: writing Mac and iPhone applications.

Joshua/Jules: Totally agree about the positives of Objective C. I love how dynamic it is, although as far as I can tell, it is not much different than ActionScript 3 in its balance of dynamic/static typing. 

I also love using categories. Being able to extend classes in this way (similar to C# 3.0 or Ruby).


Moke.e.boy: OMeta? Never heard of it. What does it do?</description>
		<content:encoded><![CDATA[<p>Felix: I&#8217;m learning Objective C for the only thing it&#8217;s really good for these days: writing Mac and iPhone applications.</p>
<p>Joshua/Jules: Totally agree about the positives of Objective C. I love how dynamic it is, although as far as I can tell, it is not much different than ActionScript 3 in its balance of dynamic/static typing. </p>
<p>I also love using categories. Being able to extend classes in this way (similar to C# 3.0 or Ruby).</p>
<p>Moke.e.boy: OMeta? Never heard of it. What does it do?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: monk.e.boy</title>
		<link>http://kuwamoto.org/2008/07/02/objective-c-readability-and-language-design/comment-page-1/#comment-202872</link>
		<dc:creator>monk.e.boy</dc:creator>
		<pubDate>Thu, 03 Jul 2008 09:26:33 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=147#comment-202872</guid>
		<description>Jesus wept. That has turned me off ObjC forever ;-)

Us Python programmers are still asking for &quot;c++&quot; rather thatn &quot;c += 1&quot; thank god it&#039;s not as ugly as your example...

Wouldn&#039;t OMeta solve all these problems? Mini, domain specific languages....

monk.e.boy</description>
		<content:encoded><![CDATA[<p>Jesus wept. That has turned me off ObjC forever ;-)</p>
<p>Us Python programmers are still asking for &#8220;c++&#8221; rather thatn &#8220;c += 1&#8243; thank god it&#8217;s not as ugly as your example&#8230;</p>
<p>Wouldn&#8217;t OMeta solve all these problems? Mini, domain specific languages&#8230;.</p>
<p>monk.e.boy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JulesLt</title>
		<link>http://kuwamoto.org/2008/07/02/objective-c-readability-and-language-design/comment-page-1/#comment-202859</link>
		<dc:creator>JulesLt</dc:creator>
		<pubDate>Thu, 03 Jul 2008 08:23:22 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/?p=147#comment-202859</guid>
		<description>I can completely understand where obj-c is coming from - unlike C++ it is a strict, backwardly compatible, extension of C, with the object extensions influenced by Smalltalk (and as I&#039;m sure you&#039;ll have discovered, the OO implementation is far closer to dynamic languages than C++/Java).

But I&#039;d agree with most of your criticisms - the long method names smack of an &#039;IDE-only&#039; language (Interface Builder has been around almost as long as ObjC) - I can accept the point of view that the method names say exactly what they do, which is a big argument that experienced obj-c developers will use. I&#039;m also a big fan of named parameters in calls, but . . . well your example says it all. 

It&#039;s a bit like comments and constants - the idea behind them is to increase code clarity, but I&#039;ve seriously seen a programmer code constants for ONE,TWO,THREE, etc, all the way up to TEN, and reference the numbers by name, because they only understood &#039;numbers should be constants&#039; not &#039;well named constants add to code clarity&#039;.

Which is a roundabout way of saying that for simple cases, as in the above, the shorter code is clearer, even without all the extra type information. 

There was an attempt to modernise the syntax at one point, but it died, because existing developers didn&#039;t embrace it, and any new developers only had old-style literature to refer to.

Personally - I have high hopes for increasing first-class support of other languages against the Cocoa runtime - i.e. Ruby / Python / Smalltalk / Nu / fscript. You&#039;re still going to have the issues with the length of the Cocoa method names, but you get to work with an &#039;OO only&#039; language rather than OO extensions.</description>
		<content:encoded><![CDATA[<p>I can completely understand where obj-c is coming from &#8211; unlike C++ it is a strict, backwardly compatible, extension of C, with the object extensions influenced by Smalltalk (and as I&#8217;m sure you&#8217;ll have discovered, the OO implementation is far closer to dynamic languages than C++/Java).</p>
<p>But I&#8217;d agree with most of your criticisms &#8211; the long method names smack of an &#8216;IDE-only&#8217; language (Interface Builder has been around almost as long as ObjC) &#8211; I can accept the point of view that the method names say exactly what they do, which is a big argument that experienced obj-c developers will use. I&#8217;m also a big fan of named parameters in calls, but . . . well your example says it all. </p>
<p>It&#8217;s a bit like comments and constants &#8211; the idea behind them is to increase code clarity, but I&#8217;ve seriously seen a programmer code constants for ONE,TWO,THREE, etc, all the way up to TEN, and reference the numbers by name, because they only understood &#8216;numbers should be constants&#8217; not &#8216;well named constants add to code clarity&#8217;.</p>
<p>Which is a roundabout way of saying that for simple cases, as in the above, the shorter code is clearer, even without all the extra type information. </p>
<p>There was an attempt to modernise the syntax at one point, but it died, because existing developers didn&#8217;t embrace it, and any new developers only had old-style literature to refer to.</p>
<p>Personally &#8211; I have high hopes for increasing first-class support of other languages against the Cocoa runtime &#8211; i.e. Ruby / Python / Smalltalk / Nu / fscript. You&#8217;re still going to have the issues with the length of the Cocoa method names, but you get to work with an &#8216;OO only&#8217; language rather than OO extensions.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
