<?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"
	>
<channel>
	<title>Comments on: It&#8217;s just logic</title>
	<atom:link href="http://blog.tmorris.net/its-just-logic/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tmorris.net/its-just-logic/</link>
	<description>The weblog of Tony Morris</description>
	<pubDate>Sat, 19 May 2012 02:51:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Tony Wooster</title>
		<link>http://blog.tmorris.net/its-just-logic/#comment-2111</link>
		<dc:creator>Tony Wooster</dc:creator>
		<pubDate>Tue, 19 Feb 2008 23:42:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/its-just-logic/#comment-2111</guid>
		<description>Eegh. Early morning crankiness without coffee makes me write some aggressive things. Sorry.

What I was taking exception to was the opening line of "Don't do this. Do this" equivocating statements like:

disjunction (V)

if(p) true else q
p &#124;&#124; q

Which I incorrectly read as an equivalence between these statements, which isn't strictly true in most programming languages. My post was an argument against golf programming -- wherein if p or q are anything but boolean values, you begin returning objects which can be acted upon, which to me is obfuscated.

p &#124;&#124; q more correctly maps (in many languages, as far as I can recall) to: if (p) p else q

So, in an obfuscated way, you could write something like:

var = (p &#124;&#124; q)

Instead of:

if ( p ) var = p else var = q

Which is semantically clearer. Again, sorry for the dickish post. Hope this makes it clearer.</description>
		<content:encoded><![CDATA[<p>Eegh. Early morning crankiness without coffee makes me write some aggressive things. Sorry.</p>
<p>What I was taking exception to was the opening line of &#8220;Don&#8217;t do this. Do this&#8221; equivocating statements like:</p>
<p>disjunction (V)</p>
<p>if(p) true else q<br />
p || q</p>
<p>Which I incorrectly read as an equivalence between these statements, which isn&#8217;t strictly true in most programming languages. My post was an argument against golf programming &#8212; wherein if p or q are anything but boolean values, you begin returning objects which can be acted upon, which to me is obfuscated.</p>
<p>p || q more correctly maps (in many languages, as far as I can recall) to: if (p) p else q</p>
<p>So, in an obfuscated way, you could write something like:</p>
<p>var = (p || q)</p>
<p>Instead of:</p>
<p>if ( p ) var = p else var = q</p>
<p>Which is semantically clearer. Again, sorry for the dickish post. Hope this makes it clearer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Morris</title>
		<link>http://blog.tmorris.net/its-just-logic/#comment-2110</link>
		<dc:creator>Tony Morris</dc:creator>
		<pubDate>Thu, 14 Feb 2008 03:52:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/its-just-logic/#comment-2110</guid>
		<description>I think the intention of the post was not understood.

In each entry, is an italicised if/else construct on the first line. One the second line is a correction and "less obfuscated" expression that is equivalent. On the third line is the same expression written using denotational semantics. Each entry has a name that derives from first-order logic.

How can be it be so complicated?</description>
		<content:encoded><![CDATA[<p>I think the intention of the post was not understood.</p>
<p>In each entry, is an italicised if/else construct on the first line. One the second line is a correction and &#8220;less obfuscated&#8221; expression that is equivalent. On the third line is the same expression written using denotational semantics. Each entry has a name that derives from first-order logic.</p>
<p>How can be it be so complicated?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake McArthur</title>
		<link>http://blog.tmorris.net/its-just-logic/#comment-2106</link>
		<dc:creator>Jake McArthur</dc:creator>
		<pubDate>Thu, 14 Feb 2008 03:11:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/its-just-logic/#comment-2106</guid>
		<description>I think the intent was that both p and q are boolean values.</description>
		<content:encoded><![CDATA[<p>I think the intent was that both p and q are boolean values.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Morris</title>
		<link>http://blog.tmorris.net/its-just-logic/#comment-2109</link>
		<dc:creator>Tony Morris</dc:creator>
		<pubDate>Thu, 14 Feb 2008 03:10:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/its-just-logic/#comment-2109</guid>
		<description>Tony,
I'm not sure what to make of this. Are you advocating some of the constructs that I have denoted as "don't do this"?</description>
		<content:encoded><![CDATA[<p>Tony,<br />
I&#8217;m not sure what to make of this. Are you advocating some of the constructs that I have denoted as &#8220;don&#8217;t do this&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Wooster</title>
		<link>http://blog.tmorris.net/its-just-logic/#comment-2108</link>
		<dc:creator>Tony Wooster</dc:creator>
		<pubDate>Thu, 14 Feb 2008 01:58:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/its-just-logic/#comment-2108</guid>
		<description>Fore!

Aside from the entries that return purely true or false, this is a wonderfully obfuscated way to program. Returning values from a logical construct might work, but it's a worthless way to communicate a concept.

No cookie for you.</description>
		<content:encoded><![CDATA[<p>Fore!</p>
<p>Aside from the entries that return purely true or false, this is a wonderfully obfuscated way to program. Returning values from a logical construct might work, but it&#8217;s a worthless way to communicate a concept.</p>
<p>No cookie for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jörn Zaefferer</title>
		<link>http://blog.tmorris.net/its-just-logic/#comment-2107</link>
		<dc:creator>Jörn Zaefferer</dc:creator>
		<pubDate>Thu, 07 Feb 2008 16:24:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/its-just-logic/#comment-2107</guid>
		<description>Those are also very useful in JavaScript, maybe even more there, because you only have c-style if-else constructs, not the enhanced Scala style.</description>
		<content:encoded><![CDATA[<p>Those are also very useful in JavaScript, maybe even more there, because you only have c-style if-else constructs, not the enhanced Scala style.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

