<?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 for Technicalities</title>
	<atom:link href="http://www.sirena.org.uk/log/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sirena.org.uk/log</link>
	<description>Just another random blog</description>
	<lastBuildDate>Thu, 20 Sep 2012 21:21:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>Comment on Editor (and other) customisations by Mark Brown</title>
		<link>http://www.sirena.org.uk/log/2010/08/25/editor-and-other-customisations/comment-page-1/#comment-79776</link>
		<dc:creator>Mark Brown</dc:creator>
		<pubDate>Thu, 20 Sep 2012 21:21:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.sirena.org.uk/log/?p=302#comment-79776</guid>
		<description><![CDATA[Mostly because revbufs predates that, I think, though I&#039;ll need to check it out - there may be some other negatives.]]></description>
		<content:encoded><![CDATA[<p>Mostly because revbufs predates that, I think, though I&#8217;ll need to check it out &#8211; there may be some other negatives.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Editor (and other) customisations by dp</title>
		<link>http://www.sirena.org.uk/log/2010/08/25/editor-and-other-customisations/comment-page-1/#comment-79351</link>
		<dc:creator>dp</dc:creator>
		<pubDate>Fri, 31 Aug 2012 11:49:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.sirena.org.uk/log/?p=302#comment-79351</guid>
		<description><![CDATA[Why not use (global-auto-revert-mode 1) instead of revbufs?]]></description>
		<content:encoded><![CDATA[<p>Why not use (global-auto-revert-mode 1) instead of revbufs?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on regmap &#8211; a register map abstraction for the Linux kernel by magento</title>
		<link>http://www.sirena.org.uk/log/2011/09/30/regmap-a-register-map-abstraction-for-the-linux-kernel/comment-page-1/#comment-73249</link>
		<dc:creator>magento</dc:creator>
		<pubDate>Tue, 03 Jan 2012 12:55:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.sirena.org.uk/log/?p=422#comment-73249</guid>
		<description><![CDATA[Thanks Mark, good job!]]></description>
		<content:encoded><![CDATA[<p>Thanks Mark, good job!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on What&#8217;s wrong with switch statements? by barmic</title>
		<link>http://www.sirena.org.uk/log/2011/12/20/whats-wrong-with-switch-statements/comment-page-1/#comment-73129</link>
		<dc:creator>barmic</dc:creator>
		<pubDate>Wed, 21 Dec 2011 08:36:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.sirena.org.uk/log/?p=463#comment-73129</guid>
		<description><![CDATA[In my opinion, the switch statements is quite difficulte to use (don&#039;t forget break), but this statement have few benefits :
- the value tested is write once
- the code is more readable (you know that all case is the evaluation of ==)

For this lats point, when the case blocs is too long I think that the using of functions is a good idea to limit the size of switch to one screen.]]></description>
		<content:encoded><![CDATA[<p>In my opinion, the switch statements is quite difficulte to use (don&#8217;t forget break), but this statement have few benefits :<br />
- the value tested is write once<br />
- the code is more readable (you know that all case is the evaluation of ==)</p>
<p>For this lats point, when the case blocs is too long I think that the using of functions is a good idea to limit the size of switch to one screen.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on What&#8217;s wrong with switch statements? by pwnguin</title>
		<link>http://www.sirena.org.uk/log/2011/12/20/whats-wrong-with-switch-statements/comment-page-1/#comment-73127</link>
		<dc:creator>pwnguin</dc:creator>
		<pubDate>Wed, 21 Dec 2011 06:02:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.sirena.org.uk/log/?p=463#comment-73127</guid>
		<description><![CDATA[Two reasons: firstly, switch is error prone. Just today we encountered a problem at work where the RENAME case fell through to DELETE. Oops.

Secondly, there&#039;s a legacy concern that lesser compilers will optimize switch poorly. Probably wrong but a pervasively held belief.]]></description>
		<content:encoded><![CDATA[<p>Two reasons: firstly, switch is error prone. Just today we encountered a problem at work where the RENAME case fell through to DELETE. Oops.</p>
<p>Secondly, there&#8217;s a legacy concern that lesser compilers will optimize switch poorly. Probably wrong but a pervasively held belief.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on What&#8217;s wrong with switch statements? by Anonymous</title>
		<link>http://www.sirena.org.uk/log/2011/12/20/whats-wrong-with-switch-statements/comment-page-1/#comment-73119</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 21 Dec 2011 00:23:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.sirena.org.uk/log/?p=463#comment-73119</guid>
		<description><![CDATA[@Aaron: C, the language in question.  Switch in C doesn&#039;t do the right thing on char*, for the same reason that == doesn&#039;t; you need strcmp.

Switch also doesn&#039;t let you write more complex conditions than &quot;subject_of_switch == constant value&quot;.  You can&#039;t compare to a non-constant value, you can&#039;t add other conditions, and you can&#039;t call arbitrary predicate functions.

Also, switch has a lot more visual noise when writing a simple condition; it only makes sense when switching between several different values.]]></description>
		<content:encoded><![CDATA[<p>@Aaron: C, the language in question.  Switch in C doesn&#8217;t do the right thing on char*, for the same reason that == doesn&#8217;t; you need strcmp.</p>
<p>Switch also doesn&#8217;t let you write more complex conditions than &#8220;subject_of_switch == constant value&#8221;.  You can&#8217;t compare to a non-constant value, you can&#8217;t add other conditions, and you can&#8217;t call arbitrary predicate functions.</p>
<p>Also, switch has a lot more visual noise when writing a simple condition; it only makes sense when switching between several different values.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on What&#8217;s wrong with switch statements? by Boris Shtrasman</title>
		<link>http://www.sirena.org.uk/log/2011/12/20/whats-wrong-with-switch-statements/comment-page-1/#comment-73117</link>
		<dc:creator>Boris Shtrasman</dc:creator>
		<pubDate>Tue, 20 Dec 2011 23:03:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.sirena.org.uk/log/?p=463#comment-73117</guid>
		<description><![CDATA[Bernhard Rlink, actually I&#039;m dealing with a lot of decision tree in kernel from what I witnessed there are two common practices:
using a data structure that will dynamically resolve a unique state - that paradigm actually use a macro call / function call :
value = dtree_get_end_state(&amp;value)

so you will see a switch case for enamurators.

in cases of getting some number (result and not a state) you would witness a small if else (since switch case can&#039;t be done here).

the second paradigm is actually coding the dtree (example when taking the exported trees from weka like systems) - this will resolve in an ugly canonical if else structure.

about the original code I witnessed this kind of practice in audio processing cards propriety code (that can be loaded for specific kernels).]]></description>
		<content:encoded><![CDATA[<p>Bernhard Rlink, actually I&#8217;m dealing with a lot of decision tree in kernel from what I witnessed there are two common practices:<br />
using a data structure that will dynamically resolve a unique state &#8211; that paradigm actually use a macro call / function call :<br />
value = dtree_get_end_state(&amp;value)</p>
<p>so you will see a switch case for enamurators.</p>
<p>in cases of getting some number (result and not a state) you would witness a small if else (since switch case can&#8217;t be done here).</p>
<p>the second paradigm is actually coding the dtree (example when taking the exported trees from weka like systems) &#8211; this will resolve in an ugly canonical if else structure.</p>
<p>about the original code I witnessed this kind of practice in audio processing cards propriety code (that can be loaded for specific kernels).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on What&#8217;s wrong with switch statements? by Mark Brown</title>
		<link>http://www.sirena.org.uk/log/2011/12/20/whats-wrong-with-switch-statements/comment-page-1/#comment-73116</link>
		<dc:creator>Mark Brown</dc:creator>
		<pubDate>Tue, 20 Dec 2011 17:36:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.sirena.org.uk/log/?p=463#comment-73116</guid>
		<description><![CDATA[The particular use that I&#039;m seeing a lot of is where people are writing &quot;depending on the value of this enumeration do something&quot; which really doesn&#039;t fit with decision trees or anything like that.

For the Python (or whatever) programmers I can see that happening, though I&#039;m not sure there&#039;s as large a crossover between audio driver authors and people programming with those languages.]]></description>
		<content:encoded><![CDATA[<p>The particular use that I&#8217;m seeing a lot of is where people are writing &#8220;depending on the value of this enumeration do something&#8221; which really doesn&#8217;t fit with decision trees or anything like that.</p>
<p>For the Python (or whatever) programmers I can see that happening, though I&#8217;m not sure there&#8217;s as large a crossover between audio driver authors and people programming with those languages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on What&#8217;s wrong with switch statements? by Bernhard R. Link</title>
		<link>http://www.sirena.org.uk/log/2011/12/20/whats-wrong-with-switch-statements/comment-page-1/#comment-73115</link>
		<dc:creator>Bernhard R. Link</dc:creator>
		<pubDate>Tue, 20 Dec 2011 17:20:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.sirena.org.uk/log/?p=463#comment-73115</guid>
		<description><![CDATA[I&#039;d say the both ways also differ in what is being expressed. In the one case one has multiple cases being formally on the same level. In the other case you have some decision tree to decide what is used. While sometimes such a decision tree might involve different variables and only after some modifications ending up to be only about one variable, there are also cases where the logic is about some decision tree. Even if everything is about the same variable, so a later case might never happen even if it was a switch statement, it can be more expressive to write it as the &quot;first check this condition, otherwise check something else&quot; that it is meant to be.

The cases you have seen might not have been from the second case, but perhaps the places they got the pattern from had.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;d say the both ways also differ in what is being expressed. In the one case one has multiple cases being formally on the same level. In the other case you have some decision tree to decide what is used. While sometimes such a decision tree might involve different variables and only after some modifications ending up to be only about one variable, there are also cases where the logic is about some decision tree. Even if everything is about the same variable, so a later case might never happen even if it was a switch statement, it can be more expressive to write it as the &#8220;first check this condition, otherwise check something else&#8221; that it is meant to be.</p>
<p>The cases you have seen might not have been from the second case, but perhaps the places they got the pattern from had.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on What&#8217;s wrong with switch statements? by Alvin</title>
		<link>http://www.sirena.org.uk/log/2011/12/20/whats-wrong-with-switch-statements/comment-page-1/#comment-73112</link>
		<dc:creator>Alvin</dc:creator>
		<pubDate>Tue, 20 Dec 2011 16:43:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.sirena.org.uk/log/?p=463#comment-73112</guid>
		<description><![CDATA[Since version 5.10, Perl also has a switch statement as part of the core distribution.
http://perldoc.perl.org/Switch.html]]></description>
		<content:encoded><![CDATA[<p>Since version 5.10, Perl also has a switch statement as part of the core distribution.<br />
<a href="http://perldoc.perl.org/Switch.html" rel="nofollow">http://perldoc.perl.org/Switch.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
