<?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: Tabs vs. spaces redux</title>
	<atom:link href="http://boredzo.org/blog/archives/2008-11-05/tabs-vs-spaces-redux/feed" rel="self" type="application/rss+xml" />
	<link>http://boredzo.org/blog/archives/2008-11-05/tabs-vs-spaces-redux</link>
	<description>The personal weblog of Peter Hosey.</description>
	<lastBuildDate>Mon, 15 Mar 2010 23:31:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Marius Andersen</title>
		<link>http://boredzo.org/blog/archives/2008-11-05/tabs-vs-spaces-redux/comment-page-1#comment-268630</link>
		<dc:creator>Marius Andersen</dc:creator>
		<pubDate>Thu, 16 Apr 2009 17:10:33 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/?p=695#comment-268630</guid>
		<description>Emacs does:

http://www.emacswiki.org/emacs/IntelligentTabs</description>
		<content:encoded><![CDATA[<p>Emacs does:</p>
<p><a href="http://www.emacswiki.org/emacs/IntelligentTabs" rel="nofollow">http://www.emacswiki.org/emacs/IntelligentTabs</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Fisher</title>
		<link>http://boredzo.org/blog/archives/2008-11-05/tabs-vs-spaces-redux/comment-page-1#comment-231708</link>
		<dc:creator>Steven Fisher</dc:creator>
		<pubDate>Fri, 07 Nov 2008 17:14:23 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/?p=695#comment-231708</guid>
		<description>What you&#039;re really saying here is very simple:
Indents should use tabs.
Alignment should use spaces.
They&#039;re &lt;strong&gt;not&lt;/strong&gt; the same thing.
The editor should help you do this.

I agree on all four points. However, I&#039;ll add that I tried to do this for years in Visual Studio. I haven&#039;t even bothered with Xcode, thanks to all the extra alignment in Objective-C code. And I&#039;d be happy with an editor that just stopped fighting me on it.</description>
		<content:encoded><![CDATA[<p>What you're really saying here is very simple:<br />
Indents should use tabs.<br />
Alignment should use spaces.<br />
They're <strong>not</strong> the same thing.<br />
The editor should help you do this.</p>
<p>I agree on all four points. However, I'll add that I tried to do this for years in Visual Studio. I haven't even bothered with Xcode, thanks to all the extra alignment in Objective-C code. And I'd be happy with an editor that just stopped fighting me on it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Hosey</title>
		<link>http://boredzo.org/blog/archives/2008-11-05/tabs-vs-spaces-redux/comment-page-1#comment-231674</link>
		<dc:creator>Peter Hosey</dc:creator>
		<pubDate>Fri, 07 Nov 2008 08:09:43 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/?p=695#comment-231674</guid>
		<description>&lt;p&gt;gparker: I went and put a &lt;code&gt;pre&lt;/code&gt; element around that for you.&lt;/p&gt;

&lt;p&gt;I don&#039;t think there&#039;s a perfect solution to that problem (also discussed by Christopher Bowns on his post) without a much smarter editor.&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>gparker: I went and put a <code>pre</code> element around that for you.</p>
<p>I don't think there's a perfect solution to that problem (also discussed by Christopher Bowns on his post) without a much smarter editor.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gparker</title>
		<link>http://boredzo.org/blog/archives/2008-11-05/tabs-vs-spaces-redux/comment-page-1#comment-231628</link>
		<dc:creator>gparker</dc:creator>
		<pubDate>Fri, 07 Nov 2008 05:47:52 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/?p=695#comment-231628</guid>
		<description>(The preview showed a fixed-width font. Bad weblog software, no biscuit.)</description>
		<content:encoded><![CDATA[<p>(The preview showed a fixed-width font. Bad weblog software, no biscuit.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gparker</title>
		<link>http://boredzo.org/blog/archives/2008-11-05/tabs-vs-spaces-redux/comment-page-1#comment-231627</link>
		<dc:creator>gparker</dc:creator>
		<pubDate>Fri, 07 Nov 2008 05:47:04 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/?p=695#comment-231627</guid>
		<description>This scheme is still insufficient. It only works if the elements that require alignment are on lines that share the same indentation scope.

&lt;pre&gt;
&#124;~~~if (condition) {~~~// multi-line
&#124;~~~&#124;~~~code;~~~~~~~~~~// comment
&#124;~~~&#124;~~~more code;~~~~~// describing the block
&#124;~~~}// multi-line macro declaration
#define foo~~~~~~\
&#124;~~~do {~~~~~~~~~\
&#124;~~~&#124;~~~code;~~~~\
&#124;~~~} while (0)
&lt;/pre&gt;

If you change the width of the leading indentation, the alignment of the trailing elements will be mangled.</description>
		<content:encoded><![CDATA[<p>This scheme is still insufficient. It only works if the elements that require alignment are on lines that share the same indentation scope.</p>
<pre>
|~~~if (condition) {~~~// multi-line
|~~~|~~~code;~~~~~~~~~~// comment
|~~~|~~~more code;~~~~~// describing the block
|~~~}// multi-line macro declaration
#define foo~~~~~~\
|~~~do {~~~~~~~~~\
|~~~|~~~code;~~~~\
|~~~} while (0)
</pre>
<p>If you change the width of the leading indentation, the alignment of the trailing elements will be mangled.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher Bowns</title>
		<link>http://boredzo.org/blog/archives/2008-11-05/tabs-vs-spaces-redux/comment-page-1#comment-230956</link>
		<dc:creator>Christopher Bowns</dc:creator>
		<pubDate>Thu, 06 Nov 2008 16:43:05 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/?p=695#comment-230956</guid>
		<description>The wackiest thing about &quot;Xcode, for example, will use on each line as many tabs as it can fit, followed by &lt; tabstop spaces. Other editors won&#039;t line up the colons; they&#039;ll just left-justify all of the non-first lines&quot;: TextMate does it the other way around when you hit control-q, as I showed in my post. It&#039;s spaces all the way, presumably because it uses a Ruby snippet to do the text manipulation.

In an even more ideal world, when Alice or Bob edits the parameter name of, say, &quot;errorDescription:&quot;, because they realized it&#039;s supposed to be &quot;errorText:&quot; instead, the editor auto-eats or auto-inserts spaces before it to keep the semi-colons aligned. The result would resemble a right-justified text, with the colons being the &quot;margin&quot;, but the implementation is far trickier.</description>
		<content:encoded><![CDATA[<p>The wackiest thing about "Xcode, for example, will use on each line as many tabs as it can fit, followed by &lt; tabstop spaces. Other editors won't line up the colons; they'll just left-justify all of the non-first lines": TextMate does it the other way around when you hit control-q, as I showed in my post. It's spaces all the way, presumably because it uses a Ruby snippet to do the text manipulation.</p>
<p>In an even more ideal world, when Alice or Bob edits the parameter name of, say, "errorDescription:", because they realized it's supposed to be "errorText:" instead, the editor auto-eats or auto-inserts spaces before it to keep the semi-colons aligned. The result would resemble a right-justified text, with the colons being the "margin", but the implementation is far trickier.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mattias</title>
		<link>http://boredzo.org/blog/archives/2008-11-05/tabs-vs-spaces-redux/comment-page-1#comment-230912</link>
		<dc:creator>Mattias</dc:creator>
		<pubDate>Thu, 06 Nov 2008 08:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/?p=695#comment-230912</guid>
		<description>I was actually about to write something like this myself a few days ago, but haven&#039;t had the time to do it yet. I guess I&#039;ll just write a short post and link to you and Christopher. And why not file a feature request over at Apple while you&#039;re at it?</description>
		<content:encoded><![CDATA[<p>I was actually about to write something like this myself a few days ago, but haven't had the time to do it yet. I guess I'll just write a short post and link to you and Christopher. And why not file a feature request over at Apple while you're at it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Hosey</title>
		<link>http://boredzo.org/blog/archives/2008-11-05/tabs-vs-spaces-redux/comment-page-1#comment-230910</link>
		<dc:creator>Peter Hosey</dc:creator>
		<pubDate>Thu, 06 Nov 2008 08:05:34 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/?p=695#comment-230910</guid>
		<description>David Wilson: I wholeheartedly agree. Basically, the editor should be able to learn the “local” style, display whatever style the user wants to see, and then write the file&#039;s original style out when saving (regardless of the display style).

So, for one example, if the file uses four-space indents and the user wants eight-space indents, it shows eight-space indents to the user, and converts these to four-space indents when saving.

The hard part would be handling inconsistent styles intelligently.</description>
		<content:encoded><![CDATA[<p>David Wilson: I wholeheartedly agree. Basically, the editor should be able to learn the “local” style, display whatever style the user wants to see, and then write the file's original style out when saving (regardless of the display style).</p>
<p>So, for one example, if the file uses four-space indents and the user wants eight-space indents, it shows eight-space indents to the user, and converts these to four-space indents when saving.</p>
<p>The hard part would be handling inconsistent styles intelligently.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Wilson</title>
		<link>http://boredzo.org/blog/archives/2008-11-05/tabs-vs-spaces-redux/comment-page-1#comment-230905</link>
		<dc:creator>David Wilson</dc:creator>
		<pubDate>Thu, 06 Nov 2008 07:42:20 +0000</pubDate>
		<guid isPermaLink="false">http://boredzo.org/blog/?p=695#comment-230905</guid>
		<description>What bothers me is that we care about such things in the first place. It is possible for a suitab ly capable editor to render the syntax tree in whatever way pleases the individual user. I think a large part of the tabs/spaces/formatting/K&amp;R/ANSI/etc. debate would quickly go away if we had such smart editors.</description>
		<content:encoded><![CDATA[<p>What bothers me is that we care about such things in the first place. It is possible for a suitab ly capable editor to render the syntax tree in whatever way pleases the individual user. I think a large part of the tabs/spaces/formatting/K&amp;R/ANSI/etc. debate would quickly go away if we had such smart editors.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.310 seconds -->
