<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Does Anyone Like Electric Indentation?</title>
	<atom:link href="http://curiousprogrammer.wordpress.com/2009/02/08/electric-indentation/feed/" rel="self" type="application/rss+xml" />
	<link>http://curiousprogrammer.wordpress.com/2009/02/08/electric-indentation/</link>
	<description>Leveraging Perl and Emacs</description>
	<lastBuildDate>Tue, 07 May 2013 11:25:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Jared</title>
		<link>http://curiousprogrammer.wordpress.com/2009/02/08/electric-indentation/#comment-7233</link>
		<dc:creator><![CDATA[Jared]]></dc:creator>
		<pubDate>Tue, 10 Feb 2009 07:49:14 +0000</pubDate>
		<guid isPermaLink="false">http://curiousprogrammer.wordpress.com/?p=186#comment-7233</guid>
		<description><![CDATA[@phil - Yes, part of my point was that if you&#039;re electric indenting it better be possible to configure the indent so it is correct first time.  Thanks for the pointer to the patch, I&#039;ll take a look.  (and why is electric indent better for you than indenting after carriage return?)

@martin - thanks, that clarifies what you were saying, and yes I see why it would be good for a certain set of programmers.

@snogglethorpe - your second and third paragraphs neatly sum up what I meant by electric indent interacting particularly badly with js2.el.  And now I think about it, perhaps it could be useful for closing braces/brackets/etc. and I was (am) getting hung up on electric indent on quotes.  Thanks for the input.]]></description>
		<content:encoded><![CDATA[<p>@phil &#8211; Yes, part of my point was that if you&#8217;re electric indenting it better be possible to configure the indent so it is correct first time.  Thanks for the pointer to the patch, I&#8217;ll take a look.  (and why is electric indent better for you than indenting after carriage return?)</p>
<p>@martin &#8211; thanks, that clarifies what you were saying, and yes I see why it would be good for a certain set of programmers.</p>
<p>@snogglethorpe &#8211; your second and third paragraphs neatly sum up what I meant by electric indent interacting particularly badly with js2.el.  And now I think about it, perhaps it could be useful for closing braces/brackets/etc. and I was (am) getting hung up on electric indent on quotes.  Thanks for the input.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: snogglethorpe</title>
		<link>http://curiousprogrammer.wordpress.com/2009/02/08/electric-indentation/#comment-7232</link>
		<dc:creator><![CDATA[snogglethorpe]]></dc:creator>
		<pubDate>Tue, 10 Feb 2009 05:00:16 +0000</pubDate>
		<guid isPermaLink="false">http://curiousprogrammer.wordpress.com/?p=186#comment-7232</guid>
		<description><![CDATA[I can take or leave electric indentation -- I find it can be nice in languages like C where often the indentation changes due to a line&#039;s contents, and I don&#039;t really want to add a new line afterwards.

However, I do feel strongly that a language mode should do correct indentation, without stupid workarounds like &quot;oh just keep hitting TAB until it looks right&quot;.

In this case, the thing that is broken is _not_ electric indentation, but the indenter.  Maybe it&#039;s a non-trivial problem for some languages (it seems vaguely odd that javascript would be one of them, but who knows...), and maybe yegge&#039;s not up to solving it, but that doesn&#039;t change the fact that it&#039;s broken.

There are obviously languages like python which are incompatible with automatic indendation, but that&#039;s a problem peculiar to such odd languages.

Of course, some people may simply dislike electric indentation -- that&#039;s fine, but it&#039;s a personal preference, it doesn&#039;t discount the fact that other people _do_ like it.]]></description>
		<content:encoded><![CDATA[<p>I can take or leave electric indentation &#8212; I find it can be nice in languages like C where often the indentation changes due to a line&#8217;s contents, and I don&#8217;t really want to add a new line afterwards.</p>
<p>However, I do feel strongly that a language mode should do correct indentation, without stupid workarounds like &#8220;oh just keep hitting TAB until it looks right&#8221;.</p>
<p>In this case, the thing that is broken is _not_ electric indentation, but the indenter.  Maybe it&#8217;s a non-trivial problem for some languages (it seems vaguely odd that javascript would be one of them, but who knows&#8230;), and maybe yegge&#8217;s not up to solving it, but that doesn&#8217;t change the fact that it&#8217;s broken.</p>
<p>There are obviously languages like python which are incompatible with automatic indendation, but that&#8217;s a problem peculiar to such odd languages.</p>
<p>Of course, some people may simply dislike electric indentation &#8212; that&#8217;s fine, but it&#8217;s a personal preference, it doesn&#8217;t discount the fact that other people _do_ like it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://curiousprogrammer.wordpress.com/2009/02/08/electric-indentation/#comment-7230</link>
		<dc:creator><![CDATA[Martin]]></dc:creator>
		<pubDate>Mon, 09 Feb 2009 22:43:12 +0000</pubDate>
		<guid isPermaLink="false">http://curiousprogrammer.wordpress.com/?p=186#comment-7230</guid>
		<description><![CDATA[Sorry, my reply was confused in the middle...here&#039;s what I meant to say:

1) automatic, immediate code formatting (this is more than electric indentation or perhaps is electric indentation where every character is electric) can be useful in some domain-specific language cases, or some beginning-programming-language cases (this is what I meant by my first paragraph)

2) I suppose the electric indentation you speak of wouldn&#039;t be *too* much more confusing to a beginning programmer than post-return indenting, though I have no emplirical basis for this supposition (this is what I meant by &quot;I think VB’s electric-indentation is perfectly matched to its user base&quot;)

3) I don&#039;t personally like electric indentation except perhaps in some DSLs.

So I think I&#039;m agreeing with your (implied) premise that you can&#039;t see electric indentation&#039;s benefit to you (personally), and answering your explicit question (&quot;what is [as in, can be] useful about electric indentation&quot;).]]></description>
		<content:encoded><![CDATA[<p>Sorry, my reply was confused in the middle&#8230;here&#8217;s what I meant to say:</p>
<p>1) automatic, immediate code formatting (this is more than electric indentation or perhaps is electric indentation where every character is electric) can be useful in some domain-specific language cases, or some beginning-programming-language cases (this is what I meant by my first paragraph)</p>
<p>2) I suppose the electric indentation you speak of wouldn&#8217;t be *too* much more confusing to a beginning programmer than post-return indenting, though I have no emplirical basis for this supposition (this is what I meant by &#8220;I think VB’s electric-indentation is perfectly matched to its user base&#8221;)</p>
<p>3) I don&#8217;t personally like electric indentation except perhaps in some DSLs.</p>
<p>So I think I&#8217;m agreeing with your (implied) premise that you can&#8217;t see electric indentation&#8217;s benefit to you (personally), and answering your explicit question (&#8220;what is [as in, can be] useful about electric indentation&#8221;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil</title>
		<link>http://curiousprogrammer.wordpress.com/2009/02/08/electric-indentation/#comment-7229</link>
		<dc:creator><![CDATA[Phil]]></dc:creator>
		<pubDate>Mon, 09 Feb 2009 22:01:05 +0000</pubDate>
		<guid isPermaLink="false">http://curiousprogrammer.wordpress.com/?p=186#comment-7229</guid>
		<description><![CDATA[In general I love electric-indentation if it can be assumed to do the right thing without any extra help. But js2-mode&#039;s default indentation is infuriating. It was almost enough to make me ditch the mode entirely. Luckily I found a fix:

http://github.com/technomancy/emacs-starter-kit/blob/fe721654bd21825d36bace0f46a79271c5769cc1/starter-kit-js.el#L36

(I believe this was from a rejected (arg!) patch to js-2 from the tracker.)]]></description>
		<content:encoded><![CDATA[<p>In general I love electric-indentation if it can be assumed to do the right thing without any extra help. But js2-mode&#8217;s default indentation is infuriating. It was almost enough to make me ditch the mode entirely. Luckily I found a fix:</p>
<p><a href="http://github.com/technomancy/emacs-starter-kit/blob/fe721654bd21825d36bace0f46a79271c5769cc1/starter-kit-js.el#L36" rel="nofollow">http://github.com/technomancy/emacs-starter-kit/blob/fe721654bd21825d36bace0f46a79271c5769cc1/starter-kit-js.el#L36</a></p>
<p>(I believe this was from a rejected (arg!) patch to js-2 from the tracker.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jared</title>
		<link>http://curiousprogrammer.wordpress.com/2009/02/08/electric-indentation/#comment-7228</link>
		<dc:creator><![CDATA[Jared]]></dc:creator>
		<pubDate>Mon, 09 Feb 2009 20:40:47 +0000</pubDate>
		<guid isPermaLink="false">http://curiousprogrammer.wordpress.com/?p=186#comment-7228</guid>
		<description><![CDATA[Hi Martin,

I didn&#039;t think about protecting (more experienced programmers from) beginning programmers, that is a good point.  However, I still don&#039;t see why adding an indent after a carriage return wouldn&#039;t be sufficient.  Or alternatively, if you really want to force a particular indentation on people, why not make every keystroke cause a re-indent?

Thanks]]></description>
		<content:encoded><![CDATA[<p>Hi Martin,</p>
<p>I didn&#8217;t think about protecting (more experienced programmers from) beginning programmers, that is a good point.  However, I still don&#8217;t see why adding an indent after a carriage return wouldn&#8217;t be sufficient.  Or alternatively, if you really want to force a particular indentation on people, why not make every keystroke cause a re-indent?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://curiousprogrammer.wordpress.com/2009/02/08/electric-indentation/#comment-7227</link>
		<dc:creator><![CDATA[Martin]]></dc:creator>
		<pubDate>Mon, 09 Feb 2009 13:22:55 +0000</pubDate>
		<guid isPermaLink="false">http://curiousprogrammer.wordpress.com/?p=186#comment-7227</guid>
		<description><![CDATA[Nope, don&#039;t like it.  I think automatic, enforced code formatting has great value for beginning programmers or maintainers-who-are-not-primarily-programmers, because it lets them a) immediately see when their code&#039;s AST does not match their expectation, since that case almost always occurs when they make a mistake (as opposed to when an experienced programmer might intentionally violate an indentation style for a very good reason); and b) it allows them to ignore the maintenance-of indentation (have you seen bad/new/non-programmers&#039; indentation?? It&#039;s usually incredibly offensive).

I think VB&#039;s electric-indentation is perfectly matched to its user base, and I&#039;ve seen some domain-specific &quot;IDE&quot;s that do this to great effect.

So in this context I think you should decide whether you want non-serious programmers to use your environment for  programming; if so, definitely enforce electric-indentation.  If not, forget it.]]></description>
		<content:encoded><![CDATA[<p>Nope, don&#8217;t like it.  I think automatic, enforced code formatting has great value for beginning programmers or maintainers-who-are-not-primarily-programmers, because it lets them a) immediately see when their code&#8217;s AST does not match their expectation, since that case almost always occurs when they make a mistake (as opposed to when an experienced programmer might intentionally violate an indentation style for a very good reason); and b) it allows them to ignore the maintenance-of indentation (have you seen bad/new/non-programmers&#8217; indentation?? It&#8217;s usually incredibly offensive).</p>
<p>I think VB&#8217;s electric-indentation is perfectly matched to its user base, and I&#8217;ve seen some domain-specific &#8220;IDE&#8221;s that do this to great effect.</p>
<p>So in this context I think you should decide whether you want non-serious programmers to use your environment for  programming; if so, definitely enforce electric-indentation.  If not, forget it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
