<?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: continue &#8211; the forgotten statement</title>
	<atom:link href="http://www.sitepoint.com/blogs/2008/04/14/continue-the-forgotten-statement/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepoint.com/blogs/2008/04/14/continue-the-forgotten-statement/</link>
	<description>News, opinion, and fresh thinking for web developers and designers. The official podcast of sitepoint.com.</description>
	<lastBuildDate>Mon, 23 Nov 2009 10:06:45 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Paul Annesley</title>
		<link>http://www.sitepoint.com/blogs/2008/04/14/continue-the-forgotten-statement/comment-page-1/#comment-696327</link>
		<dc:creator>Paul Annesley</dc:creator>
		<pubDate>Fri, 18 Apr 2008 00:57:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2423#comment-696327</guid>
		<description>cranial-bore: I&#039;ve fixed your code formatting.

There&#039;s a little item in the right hand column here called &#039;Posting Code Snippets - Marking Up Your Code&#039; which is handy to refer to.</description>
		<content:encoded><![CDATA[<p>cranial-bore: I&#8217;ve fixed your code formatting.</p>
<p>There&#8217;s a little item in the right hand column here called &#8216;Posting Code Snippets &#8211; Marking Up Your Code&#8217; which is handy to refer to.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: brothercake</title>
		<link>http://www.sitepoint.com/blogs/2008/04/14/continue-the-forgotten-statement/comment-page-1/#comment-693113</link>
		<dc:creator>brothercake</dc:creator>
		<pubDate>Wed, 16 Apr 2008 01:11:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2423#comment-693113</guid>
		<description>Well, the difference as I understand it is whether a portion of code is &lt;em&gt;interpreted&lt;/em&gt; or merely &lt;em&gt;read through&lt;/em&gt; - the else{} portion always needs to be read through, looking for where it ends, but it doesn&#039;t need to be interpreted unless the if() case is false.

Course I might be completely wrong.

Here&#039;s the benchmark: http://www.brothercake.com/clients/sitepoint/benchmarks.html</description>
		<content:encoded><![CDATA[<p>Well, the difference as I understand it is whether a portion of code is <em>interpreted</em> or merely <em>read through</em> &#8211; the else{} portion always needs to be read through, looking for where it ends, but it doesn&#8217;t need to be interpreted unless the if() case is false.</p>
<p>Course I might be completely wrong.</p>
<p>Here&#8217;s the benchmark: <a href="http://www.brothercake.com/clients/sitepoint/benchmarks.html" rel="nofollow">http://www.brothercake.com/clients/sitepoint/benchmarks.html</a></p>]]></content:encoded>
	</item>
	<item>
		<title>By: borfast</title>
		<link>http://www.sitepoint.com/blogs/2008/04/14/continue-the-forgotten-statement/comment-page-1/#comment-692218</link>
		<dc:creator>borfast</dc:creator>
		<pubDate>Tue, 15 Apr 2008 10:32:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2423#comment-692218</guid>
		<description>brothercake, sorry, I did not notice this was a blog post; since it looks the same as the rest of the sitepoint website and I landed here directly from another site, I did not notice it wasn&#039;t a full article. I take back what I said about this, then :)

As for the continue being faster, I still don&#039;t think it makes sense. I&#039;m not ignoring the facts (your benchmarks) but as Dave said, the conditional is still evaluated, so it really shouldn&#039;t make any difference.

Could you post the code you used for your benchmark? I think it would be interesting to try to figure out why it was faster - perhaps we can extrapolate and learn a new way to make our code faster in other bits, too. ;)</description>
		<content:encoded><![CDATA[<p>brothercake, sorry, I did not notice this was a blog post; since it looks the same as the rest of the sitepoint website and I landed here directly from another site, I did not notice it wasn&#8217;t a full article. I take back what I said about this, then :)</p>
<p>As for the continue being faster, I still don&#8217;t think it makes sense. I&#8217;m not ignoring the facts (your benchmarks) but as Dave said, the conditional is still evaluated, so it really shouldn&#8217;t make any difference.</p>
<p>Could you post the code you used for your benchmark? I think it would be interesting to try to figure out why it was faster &#8211; perhaps we can extrapolate and learn a new way to make our code faster in other bits, too. ;)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: asbjornu</title>
		<link>http://www.sitepoint.com/blogs/2008/04/14/continue-the-forgotten-statement/comment-page-1/#comment-691978</link>
		<dc:creator>asbjornu</dc:creator>
		<pubDate>Tue, 15 Apr 2008 06:44:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2423#comment-691978</guid>
		<description>i use the &lt;code&gt;continue&lt;/code&gt; statement all the time. In just the same manner, I use &lt;code&gt;return&lt;/code&gt; and &lt;code&gt;throw&lt;/code&gt; statements too; all in the upper parts of the function/method/loop body to get rid of all erronous states first. This makes for a lot cleaner code in my opinion, especially since it gives a lot less indentation and nesting levels.

All those &lt;code&gt;else&lt;/code&gt; statements gives you a new execution path to follow and if you nest those three times, the code is three times harder to follow.</description>
		<content:encoded><![CDATA[<p>i use the <code>continue</code> statement all the time. In just the same manner, I use <code>return</code> and <code>throw</code> statements too; all in the upper parts of the function/method/loop body to get rid of all erronous states first. This makes for a lot cleaner code in my opinion, especially since it gives a lot less indentation and nesting levels.</p>
<p>All those <code>else</code> statements gives you a new execution path to follow and if you nest those three times, the code is three times harder to follow.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: brothercake</title>
		<link>http://www.sitepoint.com/blogs/2008/04/14/continue-the-forgotten-statement/comment-page-1/#comment-691714</link>
		<dc:creator>brothercake</dc:creator>
		<pubDate>Tue, 15 Apr 2008 01:17:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2423#comment-691714</guid>
		<description>Okay so I ran a benchmark against these two patterns, and the continue pattern is faster every time (over 10 millions iterations); it&#039;s not massively faster, but the difference is there and predictable.

That wasn&#039;t really my main point anyway - I like the continue pattern because I just think it reads better; maybe that&#039;s just my aesthetic, but it works for me :)

ps - this is not an article, it&#039;s a blog post; of course I knocked it off quickly, it&#039;s a blog post.</description>
		<content:encoded><![CDATA[<p>Okay so I ran a benchmark against these two patterns, and the continue pattern is faster every time (over 10 millions iterations); it&#8217;s not massively faster, but the difference is there and predictable.</p>
<p>That wasn&#8217;t really my main point anyway &#8211; I like the continue pattern because I just think it reads better; maybe that&#8217;s just my aesthetic, but it works for me :)</p>
<p>ps &#8211; this is not an article, it&#8217;s a blog post; of course I knocked it off quickly, it&#8217;s a blog post.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.sitepoint.com/blogs/2008/04/14/continue-the-forgotten-statement/comment-page-1/#comment-691114</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Mon, 14 Apr 2008 15:29:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2423#comment-691114</guid>
		<description>More efficient? No Exactly the same. You still have to evaluate the conditional, and the same &#039;so stuff&#039; and/or &#039;whatever&#039; code gets run with both styles. Also, repeat after me: Premature Optimisation Is Bad.

The only reason to use it is readability. I would argue that it is less readable than a single if/else, but that multiple continues are more readable than nested if/else&#039;s - other people may disagree.

Not a great article.</description>
		<content:encoded><![CDATA[<p>More efficient? No Exactly the same. You still have to evaluate the conditional, and the same &#8217;so stuff&#8217; and/or &#8216;whatever&#8217; code gets run with both styles. Also, repeat after me: Premature Optimisation Is Bad.</p>
<p>The only reason to use it is readability. I would argue that it is less readable than a single if/else, but that multiple continues are more readable than nested if/else&#8217;s &#8211; other people may disagree.</p>
<p>Not a great article.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.sitepoint.com/blogs/2008/04/14/continue-the-forgotten-statement/comment-page-1/#comment-691005</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 14 Apr 2008 13:54:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2423#comment-691005</guid>
		<description>Completely agree.  Why use structured programming techniques when we can go back to GOTO? &lt;/sarcasm&gt;</description>
		<content:encoded><![CDATA[<p>Completely agree.  Why use structured programming techniques when we can go back to GOTO? &lt;/sarcasm&gt;</p>]]></content:encoded>
	</item>
	<item>
		<title>By: borfast</title>
		<link>http://www.sitepoint.com/blogs/2008/04/14/continue-the-forgotten-statement/comment-page-1/#comment-690820</link>
		<dc:creator>borfast</dc:creator>
		<pubDate>Mon, 14 Apr 2008 11:04:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2423#comment-690820</guid>
		<description>&lt;blockquote&gt;I can’t see how if.. continue.. dostuff is more readable than if... else...&lt;/blockquote&gt;
It isn&#039;t. It&#039;s actually less explicit, so one could even argue that it is &lt;em&gt;less&lt;/em&gt; readable.

As for the code efficiency argument also in the second example, I may be wrong but I don&#039;t think it applies, because if the if() condition is false, the code will not be interpreted anyway.

I don&#039;t mean to be offensive or look like I just want to bash the author but honestly, this article looks a little useless and written in a hurry without any care, just to say that something was published... :(</description>
		<content:encoded><![CDATA[<blockquote><p>I can’t see how if.. continue.. dostuff is more readable than if&#8230; else&#8230;</p></blockquote>
<p>It isn&#8217;t. It&#8217;s actually less explicit, so one could even argue that it is <em>less</em> readable.</p>
<p>As for the code efficiency argument also in the second example, I may be wrong but I don&#8217;t think it applies, because if the if() condition is false, the code will not be interpreted anyway.</p>
<p>I don&#8217;t mean to be offensive or look like I just want to bash the author but honestly, this article looks a little useless and written in a hurry without any care, just to say that something was published&#8230; :(</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.sitepoint.com/blogs/2008/04/14/continue-the-forgotten-statement/comment-page-1/#comment-690700</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 14 Apr 2008 09:10:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2423#comment-690700</guid>
		<description>I rarely use the continue keyword. Not because I&#039;ve forgotten about it, but because I choose not to use it. I think Javascript programmers are often too interested in writing &#039;clever&#039; shortcuts than writing clean maintainable code.

When compressed the second example will actually be larger than the first and, arguably, less readable. cranial-bore, I can&#039;t see how &lt;code&gt;if.. continue.. dostuff&lt;/code&gt; is more readable than &lt;code&gt;if... else...&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I rarely use the continue keyword. Not because I&#8217;ve forgotten about it, but because I choose not to use it. I think Javascript programmers are often too interested in writing &#8216;clever&#8217; shortcuts than writing clean maintainable code.</p>
<p>When compressed the second example will actually be larger than the first and, arguably, less readable. cranial-bore, I can&#8217;t see how <code>if.. continue.. dostuff</code> is more readable than <code>if... else...</code></p>]]></content:encoded>
	</item>
	<item>
		<title>By: cranial-bore</title>
		<link>http://www.sitepoint.com/blogs/2008/04/14/continue-the-forgotten-statement/comment-page-1/#comment-690573</link>
		<dc:creator>cranial-bore</dc:creator>
		<pubDate>Mon, 14 Apr 2008 07:20:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2423#comment-690573</guid>
		<description>my statement about &lt;em&gt;easier to understand&lt;/em&gt; would have been more believable if my line breaks had gone through.</description>
		<content:encoded><![CDATA[<p>my statement about <em>easier to understand</em> would have been more believable if my line breaks had gone through.</p>]]></content:encoded>
	</item>
</channel>
</rss>
