<?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: A Case Against Dot Syntax</title>
	<atom:link href="http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/</link>
	<description>Taglines are for Windows programmers</description>
	<lastBuildDate>Fri, 12 Mar 2010 16:26:13 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: On Cocoa Bindings â€“ &#8220;Let Us Break Their Bonds Asunder&#8221; &#124; Blog @ Tim Isted</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-792</link>
		<dc:creator>On Cocoa Bindings â€“ &#8220;Let Us Break Their Bonds Asunder&#8221; &#124; Blog @ Tim Isted</dc:creator>
		<pubDate>Wed, 27 Aug 2008 17:38:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-792</guid>
		<description>&lt;p&gt;[...] be interested in reading more about views on Objective-C 2.0 properties, here are two references: Marcus Zarra &#8212; A case against dot syntax Matt Gallagher &#8212; In defense of Objective-C 2.0 [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] be interested in reading more about views on Objective-C 2.0 properties, here are two references: Marcus Zarra &#8212; A case against dot syntax Matt Gallagher &#8212; In defense of Objective-C 2.0 [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: themaccircle</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-772</link>
		<dc:creator>themaccircle</dc:creator>
		<pubDate>Mon, 04 Aug 2008 19:21:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-772</guid>
		<description>&lt;p&gt;Dot syntax is really only helpful to people who have years of HTML DOM and JavaScript experience under their belt. Not that the purpose and use is the same, but the syntax  x.y that links y to x is very helpful for readability.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dot syntax is really only helpful to people who have years of HTML DOM and JavaScript experience under their belt. Not that the purpose and use is the same, but the syntax  x.y that links y to x is very helpful for readability.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: oomu</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-752</link>
		<dc:creator>oomu</dc:creator>
		<pubDate>Fri, 18 Jul 2008 22:50:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-752</guid>
		<description>&lt;p&gt;I totally agree with Marcus Zarra.   It was a not necessary addition to the language. It adds two way to do things and it&#039;s just plain confusing.&lt;/p&gt;

&lt;p&gt;the very nice aspect of Objective-C was its readability .   Maybe you want convenience, but I just see useless addition and more and more lost of objective-C.&lt;/p&gt;

&lt;p&gt;@countach&lt;/p&gt;

&lt;p&gt;on the contrary!  Objective-c is an elegant extension to C. and C compatibility is still a great asset. You can link to whatever c library you need.  Don&#039;t ask more changes which bring nothings to improve applications.&lt;/p&gt;

&lt;p&gt;and C is not a &quot;legacy cruft&quot;,  you can see the runtime allow objective C to be completely dynamical.  I cannot fathom why &quot;c&quot; can bother you.&lt;/p&gt;

&lt;p&gt;it&#039;s a tool, and the important quality for a tool is to be easy to use.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I totally agree with Marcus Zarra.   It was a not necessary addition to the language. It adds two way to do things and it&#8217;s just plain confusing.</p>

<p>the very nice aspect of Objective-C was its readability .   Maybe you want convenience, but I just see useless addition and more and more lost of objective-C.</p>

<p>@countach</p>

<p>on the contrary!  Objective-c is an elegant extension to C. and C compatibility is still a great asset. You can link to whatever c library you need.  Don&#8217;t ask more changes which bring nothings to improve applications.</p>

<p>and C is not a &#8220;legacy cruft&#8221;,  you can see the runtime allow objective C to be completely dynamical.  I cannot fathom why &#8220;c&#8221; can bother you.</p>

<p>it&#8217;s a tool, and the important quality for a tool is to be easy to use.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Cocoa Nut &#187; Blog Archive &#187; Ojective-C dot notation</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-750</link>
		<dc:creator>Cocoa Nut &#187; Blog Archive &#187; Ojective-C dot notation</dc:creator>
		<pubDate>Sun, 13 Jul 2008 08:53:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-750</guid>
		<description>&lt;p&gt;[...] This blog post by Marcus Zarra made me happy. Now I know that I&#8217;m not the only person who dislikes the dot notation which has been introduced in Objective-C 2.0. The &#8220;Properties&#8221; feature is great, since it takes a lot of work writing accessor methods away from the developer. But accessing your object members sing the dot syntax makes your code ugly and cofusing. [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] This blog post by Marcus Zarra made me happy. Now I know that I&#8217;m not the only person who dislikes the dot notation which has been introduced in Objective-C 2.0. The &#8220;Properties&#8221; feature is great, since it takes a lot of work writing accessor methods away from the developer. But accessing your object members sing the dot syntax makes your code ugly and cofusing. [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: countach</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-747</link>
		<dc:creator>countach</dc:creator>
		<pubDate>Thu, 10 Jul 2008 04:22:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-747</guid>
		<description>&lt;p&gt;I think they did it to mirror key path syntax, which makes some sense.&lt;/p&gt;

&lt;p&gt;I don&#039;t agree that it makes code brittle. It could, but it all depends on the circumstance.&lt;/p&gt;

&lt;p&gt;Since Objective-c is a hack on a hack on a hack, its hard to get too excited about ruining the purity of the language. I think they should redesign the language from the ground up with the same semantics (for backwards compatibility) but a whole new syntax, abandoning the legacy cruft of C. Whether it becomes even more like Smalltalk, or more like Java wouldn&#039;t matter.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I think they did it to mirror key path syntax, which makes some sense.</p>

<p>I don&#8217;t agree that it makes code brittle. It could, but it all depends on the circumstance.</p>

<p>Since Objective-c is a hack on a hack on a hack, its hard to get too excited about ruining the purity of the language. I think they should redesign the language from the ground up with the same semantics (for backwards compatibility) but a whole new syntax, abandoning the legacy cruft of C. Whether it becomes even more like Smalltalk, or more like Java wouldn&#8217;t matter.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: joconor</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-743</link>
		<dc:creator>joconor</dc:creator>
		<pubDate>Wed, 09 Jul 2008 13:58:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-743</guid>
		<description>&lt;p&gt;Schwa,&lt;/p&gt;

&lt;p&gt;Your example:&lt;/p&gt;

&lt;p&gt;someObject.someProperty.someOtherProperty.yetAnotherProperty = 42;&lt;/p&gt;

&lt;p&gt;is EXACTLY why I agree with the cimgf article that the dot syntax is not a good thing.  The example is a pretty bad violation of the &#039;Law of Demeter&#039; (see http://c2.com/cgi/wiki?LawOfDemeter).  The fact that the bracket syntax version of your example looks ugly is a clue to anyone reading the code that something is wrong.  The dot syntax goes some way to masking this.  The ugliness of the nested bracket case is what some refer to as a &#039;Code Smell&#039; (see http://c2.com/xp/CodeSmell.html).&lt;/p&gt;

&lt;p&gt;If you are routinely nesting the sending of messages to the results of messages as deeply as in your example, you may want to reexamine your coding style, as this ends up creating dangerously brittle code.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Schwa,</p>

<p>Your example:</p>

<p>someObject.someProperty.someOtherProperty.yetAnotherProperty = 42;</p>

<p>is EXACTLY why I agree with the cimgf article that the dot syntax is not a good thing.  The example is a pretty bad violation of the &#8216;Law of Demeter&#8217; (see <a href="http://c2.com/cgi/wiki?LawOfDemeter)" rel="nofollow">http://c2.com/cgi/wiki?LawOfDemeter)</a>.  The fact that the bracket syntax version of your example looks ugly is a clue to anyone reading the code that something is wrong.  The dot syntax goes some way to masking this.  The ugliness of the nested bracket case is what some refer to as a &#8216;Code Smell&#8217; (see <a href="http://c2.com/xp/CodeSmell.html)" rel="nofollow">http://c2.com/xp/CodeSmell.html)</a>.</p>

<p>If you are routinely nesting the sending of messages to the results of messages as deeply as in your example, you may want to reexamine your coding style, as this ends up creating dangerously brittle code.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: davidarve</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-742</link>
		<dc:creator>davidarve</dc:creator>
		<pubDate>Wed, 09 Jul 2008 10:50:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-742</guid>
		<description>&lt;p&gt;Doesn&#039;t the dot syntax come quite natural from old objective-c&#039;s key paths: NSString *mn = [selectedPerson valueForKeyPath:@&quot;spouse.scooter.modelName&quot;]; (Hillegass Cocoa Programming for Mac OS X, pp.134 2:nd edition)? Even so, I do sort of agree that it doesn&#039;t really look as nice.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Doesn&#8217;t the dot syntax come quite natural from old objective-c&#8217;s key paths: NSString *mn = [selectedPerson valueForKeyPath:@"spouse.scooter.modelName"]; (Hillegass Cocoa Programming for Mac OS X, pp.134 2:nd edition)? Even so, I do sort of agree that it doesn&#8217;t really look as nice.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Hanson</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-741</link>
		<dc:creator>Chris Hanson</dc:creator>
		<pubDate>Wed, 09 Jul 2008 06:41:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-741</guid>
		<description>&lt;p&gt;I still have to correct #3, unfortunately.&lt;/p&gt;

&lt;p&gt;Say you have a property like this:&lt;/p&gt;

&lt;p&gt;@property(copy) NSString *message;&lt;/p&gt;

&lt;p&gt;And you use it like this:&lt;/p&gt;

&lt;p&gt;self.message = @&quot;Hello, world!&quot;;&lt;/p&gt;

&lt;p&gt;That use of the &quot;message&quot; property will compile exactly the same as this Objective-C 1.0 code:&lt;/p&gt;

&lt;p&gt;[self setMessage:@&quot;Hello, world!&quot;];&lt;/p&gt;

&lt;p&gt;There is NO difference between dot syntax and bracket syntax in terms of the generated code.  Therefore, there is NO difference in how property use behaves.&lt;/p&gt;

&lt;p&gt;I&#039;m not sure why people have been assuming that dot syntax behaves like key-value coding, but it doesn&#039;t. It&#039;s just a different way of sending a message.  There aren&#039;t even objc_setProperty or objc_getProperty calls that dot syntax compiles to - dot syntax actually compiles to invocations of objc_msgSend, just as bracket syntax does.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I still have to correct #3, unfortunately.</p>

<p>Say you have a property like this:</p>

<p>@property(copy) NSString *message;</p>

<p>And you use it like this:</p>

<p>self.message = @&#8221;Hello, world!&#8221;;</p>

<p>That use of the &#8220;message&#8221; property will compile exactly the same as this Objective-C 1.0 code:</p>

<p>[self setMessage:@"Hello, world!"];</p>

<p>There is NO difference between dot syntax and bracket syntax in terms of the generated code.  Therefore, there is NO difference in how property use behaves.</p>

<p>I&#8217;m not sure why people have been assuming that dot syntax behaves like key-value coding, but it doesn&#8217;t. It&#8217;s just a different way of sending a message.  There aren&#8217;t even objc_setProperty or objc_getProperty calls that dot syntax compiles to &#8211; dot syntax actually compiles to invocations of objc_msgSend, just as bracket syntax does.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent Gable</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-740</link>
		<dc:creator>Vincent Gable</dc:creator>
		<pubDate>Wed, 09 Jul 2008 05:47:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-740</guid>
		<description>&lt;p&gt;I fail to see how dot-syntax is anything but easier to read and write.   You need a push-down automaton to balance []&#039;s, but you only need an FSM to get the dot&#039;s in dot-syntax right.  Dot-syntax is less to write, and I expect it is measurably faster to read.&lt;/p&gt;

&lt;p&gt;I don&#039;t understand why knowing if something is a struct or an object is necessary.  If every struct in Cocoa became a proper object overnight, and via dot-syntax all code that used them still worked... what would be the loss?  (From a programmer&#039;s perspective; not judging by the performance of the machine).  I have never defined a struct in any Obj-C code I have written.  I just don&#039;t see what they add over objects, and they don&#039;t play nice with Cocoa containers, so I avoid them.  What I&#039;m trying to say is, &quot;yes, dot-syntax hides a bit of type information .. so what?  I don&#039;t see how that hides the &lt;em&gt;intent&lt;/em&gt; of code.&quot;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I fail to see how dot-syntax is anything but easier to read and write.   You need a push-down automaton to balance []&#8217;s, but you only need an FSM to get the dot&#8217;s in dot-syntax right.  Dot-syntax is less to write, and I expect it is measurably faster to read.</p>

<p>I don&#8217;t understand why knowing if something is a struct or an object is necessary.  If every struct in Cocoa became a proper object overnight, and via dot-syntax all code that used them still worked&#8230; what would be the loss?  (From a programmer&#8217;s perspective; not judging by the performance of the machine).  I have never defined a struct in any Obj-C code I have written.  I just don&#8217;t see what they add over objects, and they don&#8217;t play nice with Cocoa containers, so I avoid them.  What I&#8217;m trying to say is, &#8220;yes, dot-syntax hides a bit of type information .. so what?  I don&#8217;t see how that hides the <em>intent</em> of code.&#8221;</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus Zarra</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-738</link>
		<dc:creator>Marcus Zarra</dc:creator>
		<pubDate>Wed, 09 Jul 2008 01:59:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-738</guid>
		<description>&lt;p&gt;Schwa,&lt;/p&gt;

&lt;p&gt;Your probably not abrasive enough for people to throw strawman arguments at you :)&lt;/p&gt;

&lt;p&gt;Either that or I am hanging out in the wrong places.&lt;/p&gt;

&lt;p&gt;Could be both...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Schwa,</p>

<p>Your probably not abrasive enough for people to throw strawman arguments at you :)</p>

<p>Either that or I am hanging out in the wrong places.</p>

<p>Could be both&#8230;</p>]]></content:encoded>
	</item>
	<item>
		<title>By: schwa</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-737</link>
		<dc:creator>schwa</dc:creator>
		<pubDate>Wed, 09 Jul 2008 01:51:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-737</guid>
		<description>&lt;p&gt;Oddly enough I&#039;ve not heard the myths either. I&#039;m not really anyone really needed these non-myths dispelling.&lt;/p&gt;

&lt;p&gt;I do have to say. I really like halving the line count of my dealloc method by using self.foo = NULL; so much easier to scan.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Oddly enough I&#8217;ve not heard the myths either. I&#8217;m not really anyone really needed these non-myths dispelling.</p>

<p>I do have to say. I really like halving the line count of my dealloc method by using self.foo = NULL; so much easier to scan.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus Zarra</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-736</link>
		<dc:creator>Marcus Zarra</dc:creator>
		<pubDate>Wed, 09 Jul 2008 01:41:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-736</guid>
		<description>&lt;p&gt;Devon,&lt;/p&gt;

&lt;p&gt;That makes the eyes bleed!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Devon,</p>

<p>That makes the eyes bleed!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus Zarra</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-735</link>
		<dc:creator>Marcus Zarra</dc:creator>
		<pubDate>Wed, 09 Jul 2008 01:40:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-735</guid>
		<description>&lt;p&gt;atomicbird,&lt;/p&gt;

&lt;p&gt;Those are all myths that I have heard recently within the last couple of months!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>atomicbird,</p>

<p>Those are all myths that I have heard recently within the last couple of months!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: schwa</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-734</link>
		<dc:creator>schwa</dc:creator>
		<pubDate>Wed, 09 Jul 2008 01:30:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-734</guid>
		<description>&lt;p&gt;Oops. I meant the &quot;handling of structs&quot; not of arrays. My bad.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Oops. I meant the &#8220;handling of structs&#8221; not of arrays. My bad.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: schwa</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-733</link>
		<dc:creator>schwa</dc:creator>
		<pubDate>Wed, 09 Jul 2008 01:25:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-733</guid>
		<description>&lt;p&gt;So now that the speed arguments have been demolished (@chanson FTW) your entire argument against dot notation boils down to the fact that it is &quot;just&quot; syntactic sugar and therefore is hard to maintain and/or understand?&lt;/p&gt;

&lt;p&gt;Well yeah it is syntactic sugar. But I for one am a big fan of syntactic sugar. It makes my work day (*) more pleasant. I don&#039;t have to care about balancing the braces in:&lt;/p&gt;

&lt;p&gt;[[[someObject someProperty] someOtherProperty] setYetAnotherProperty:42];&lt;/p&gt;

&lt;p&gt;I can just very explicitly:&lt;/p&gt;

&lt;p&gt;someObject.someProperty.someOtherProperty.yetAnotherProperty = 42;&lt;/p&gt;

&lt;p&gt;If part of that property path changes I can merely add or remove atoms as needed. No balancing braces. I hate balancing braces. Don&#039;t you?&lt;/p&gt;

&lt;p&gt;And as for maintainability, I really don&#039;t think either is necessarily more or less maintainable than another. When I think software maintenance I think about software complexity, not details of syntax. In fact I&#039;d say that most if not all syntactic sugar  by its very definition reduces complexity and therefore might contribute to ease of maintenance?&lt;/p&gt;

&lt;p&gt;Also don&#039;t forget that the foo/setFoo convention is just that, a convention. And a convention often ignored, for example -[NSSet setByAddingObject:]. Oops!&lt;/p&gt;

&lt;p&gt;People tend to poo over syntactic sugar. If I had a penny for every time I heard the phrase &quot;oh that&#039;s just syntactic sugar&quot; I&#039;d be knee deep in hookers and blow right now. Honest. But a lot of language features we take for granted are just syntactic sugars. Hell the C array syntax is a classic example of syntax sugar. Hell isn&#039;t Objective-C just one big syntactical sugar on top of objc_msgSend? Amiright?&lt;/p&gt;

&lt;p&gt;So yeah, there are issues with Objective-C&#039;s dot notation. Namely the handling of arrays. MyObject.frame.origin.x just can&#039;t be done and you&#039;re struct with [MyObject frame].origin.x (see what I did there?) and need to be careful when assigning to struct members. That&#039;s a flaw. I grant you. But in practice it is one that is easily understand and avoided after you use dot notation for a while.&lt;/p&gt;

&lt;p&gt;But the nice thing is, you don&#039;t have to use it. The language is happy with both styles. Use whatever makes that inner geek happy. I&#039;ll be using dot notation because it makes mine happy.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>So now that the speed arguments have been demolished (@chanson FTW) your entire argument against dot notation boils down to the fact that it is &#8220;just&#8221; syntactic sugar and therefore is hard to maintain and/or understand?</p>

<p>Well yeah it is syntactic sugar. But I for one am a big fan of syntactic sugar. It makes my work day (*) more pleasant. I don&#8217;t have to care about balancing the braces in:</p>

<p>[[[someObject someProperty] someOtherProperty] setYetAnotherProperty:42];</p>

<p>I can just very explicitly:</p>

<p>someObject.someProperty.someOtherProperty.yetAnotherProperty = 42;</p>

<p>If part of that property path changes I can merely add or remove atoms as needed. No balancing braces. I hate balancing braces. Don&#8217;t you?</p>

<p>And as for maintainability, I really don&#8217;t think either is necessarily more or less maintainable than another. When I think software maintenance I think about software complexity, not details of syntax. In fact I&#8217;d say that most if not all syntactic sugar  by its very definition reduces complexity and therefore might contribute to ease of maintenance?</p>

<p>Also don&#8217;t forget that the foo/setFoo convention is just that, a convention. And a convention often ignored, for example -[NSSet setByAddingObject:]. Oops!</p>

<p>People tend to poo over syntactic sugar. If I had a penny for every time I heard the phrase &#8220;oh that&#8217;s just syntactic sugar&#8221; I&#8217;d be knee deep in hookers and blow right now. Honest. But a lot of language features we take for granted are just syntactic sugars. Hell the C array syntax is a classic example of syntax sugar. Hell isn&#8217;t Objective-C just one big syntactical sugar on top of objc_msgSend? Amiright?</p>

<p>So yeah, there are issues with Objective-C&#8217;s dot notation. Namely the handling of arrays. MyObject.frame.origin.x just can&#8217;t be done and you&#8217;re struct with [MyObject frame].origin.x (see what I did there?) and need to be careful when assigning to struct members. That&#8217;s a flaw. I grant you. But in practice it is one that is easily understand and avoided after you use dot notation for a while.</p>

<p>But the nice thing is, you don&#8217;t have to use it. The language is happy with both styles. Use whatever makes that inner geek happy. I&#8217;ll be using dot notation because it makes mine happy.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: atomicbird</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-732</link>
		<dc:creator>atomicbird</dc:creator>
		<pubDate>Wed, 09 Jul 2008 01:11:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-732</guid>
		<description>&lt;p&gt;Maybe I appreciate the dot syntax solely because I so rarely use plain structs these days.  After a few years with Cocoa and object oriented thinking, I find that whenever I might have used a struct in the past that I also imagine some behavior that has to go along with the data.  So I end up writing a class, however small, rather than a struct.  The upshot is that the struct/class confusion never comes up when I&#039;m using dot syntax, because I&#039;m never using a struct.  Without the possibility of this confusion I find the dot syntax to be more convenient, and I confess I&#039;ve become addicted to it.&lt;/p&gt;

&lt;p&gt;I seem to recall that when the syntax was first announced at WWDC (2007?  2006?) it was explicitly described as helping to make the language more accessible to people familiar with Python and Ruby.  They&#039;re probably in a similar boat, where they&#039;d (correctly, in their case) just assume it was an object anyway and therefore not suffer any confusion.&lt;/p&gt;

&lt;p&gt;But regarding those &quot;myths&quot;:  Does anyone think those are true?  I don&#039;t think I&#039;ve encountered those mistaken ideas before.  Maybe I just &quot;get&quot; how they work because, since I knew Objective C already, I paid close attention to what exactly was implied by the new syntax and therefore avoided potholes that might trap the unwary.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Maybe I appreciate the dot syntax solely because I so rarely use plain structs these days.  After a few years with Cocoa and object oriented thinking, I find that whenever I might have used a struct in the past that I also imagine some behavior that has to go along with the data.  So I end up writing a class, however small, rather than a struct.  The upshot is that the struct/class confusion never comes up when I&#8217;m using dot syntax, because I&#8217;m never using a struct.  Without the possibility of this confusion I find the dot syntax to be more convenient, and I confess I&#8217;ve become addicted to it.</p>

<p>I seem to recall that when the syntax was first announced at WWDC (2007?  2006?) it was explicitly described as helping to make the language more accessible to people familiar with Python and Ruby.  They&#8217;re probably in a similar boat, where they&#8217;d (correctly, in their case) just assume it was an object anyway and therefore not suffer any confusion.</p>

<p>But regarding those &#8220;myths&#8221;:  Does anyone think those are true?  I don&#8217;t think I&#8217;ve encountered those mistaken ideas before.  Maybe I just &#8220;get&#8221; how they work because, since I knew Objective C already, I paid close attention to what exactly was implied by the new syntax and therefore avoided potholes that might trap the unwary.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Devon</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-731</link>
		<dc:creator>Devon</dc:creator>
		<pubDate>Wed, 09 Jul 2008 01:05:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-731</guid>
		<description>&lt;p&gt;What about [myViewController.view addSubView:newView]; bwahaha
Sometimes I use the above syntax which is pretty clear, at least to me.
I actually like the message passing syntax now over the typical dot syntax.
I guess the dot syntax goes hand in hand with the properties as Apple seems to prefer to use it for accessing properties rather than [[myViewController view] addSubView:newView].  Multiple nested brackets can sometimes get hard to read.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>What about [myViewController.view addSubView:newView]; bwahaha
Sometimes I use the above syntax which is pretty clear, at least to me.
I actually like the message passing syntax now over the typical dot syntax.
I guess the dot syntax goes hand in hand with the properties as Apple seems to prefer to use it for accessing properties rather than [[myViewController view] addSubView:newView].  Multiple nested brackets can sometimes get hard to read.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: jbaldwin</title>
		<link>http://www.cimgf.com/2008/07/08/a-case-against-dot-syntax/comment-page-1/#comment-730</link>
		<dc:creator>jbaldwin</dc:creator>
		<pubDate>Wed, 09 Jul 2008 00:59:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=137#comment-730</guid>
		<description>&lt;p&gt;As a relative newcomer to Objective-C, I have found the dot syntax somewhat confusing initially. This is because I&#039;m accustomed to it being THE way to access everything, I find that once I start using it, I go crazy and try to use it where I shouldn&#039;t.&lt;/p&gt;

&lt;p&gt;Then I curse the language, the developer tools, the platform, Steve Jobs, this blog, and then walk away waggling my head smugly knowing I&#039;m superior for having used anything else before this.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>As a relative newcomer to Objective-C, I have found the dot syntax somewhat confusing initially. This is because I&#8217;m accustomed to it being THE way to access everything, I find that once I start using it, I go crazy and try to use it where I shouldn&#8217;t.</p>

<p>Then I curse the language, the developer tools, the platform, Steve Jobs, this blog, and then walk away waggling my head smugly knowing I&#8217;m superior for having used anything else before this.</p>]]></content:encoded>
	</item>
</channel>
</rss>
