<?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: &#8216;&#124;&#124;&#8217; unequal &#8216;or&#8217;</title>
	<atom:link href="http://www.sofasportler.de/dirk.blog/articles/unequal-or/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sofasportler.de/dirk.blog/articles/unequal-or</link>
	<description>on me and coding and some things</description>
	<pubDate>Sun, 01 Aug 2010 10:51:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: or^3 &#171; mediapeers DevBlog</title>
		<link>http://www.sofasportler.de/dirk.blog/articles/unequal-or/comment-page-1#comment-61560</link>
		<dc:creator>or^3 &#171; mediapeers DevBlog</dc:creator>
		<pubDate>Wed, 14 May 2008 13:01:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.sofasportler.de/dirk.blog/articles/unequal-or#comment-61560</guid>
		<description>&lt;p&gt;[...] A nice one on Ruby operator precedence found at Dirk&#8217;s. [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] A nice one on Ruby operator precedence found at Dirk&#8217;s. [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: schmidt</title>
		<link>http://www.sofasportler.de/dirk.blog/articles/unequal-or/comment-page-1#comment-31339</link>
		<dc:creator>schmidt</dc:creator>
		<pubDate>Mon, 22 Oct 2007 10:57:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.sofasportler.de/dirk.blog/articles/unequal-or#comment-31339</guid>
		<description>&lt;p&gt;No, it should not print true. Neither should jruby or any other interpreter. "=" has a higher precedence than "or" so your statement should always read "(b = nil) or 23", which is always "23" and always assigns "nil" to "b".&lt;/p&gt;

&lt;p&gt;I have thought a while about a possible use case and could not come up with one, but I guess it will look like a long logical expression with lots of paranthesis, which may be written with less paranthesis, when regarding the operator precedence.&lt;/p&gt;

&lt;p&gt;(not true &amp;&amp; false) #=&gt; true
b = (not true and false)  #=&gt; false&lt;/p&gt;

&lt;p&gt;This difference could actually make sense in a logical expression&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>No, it should not print true. Neither should jruby or any other interpreter. &#8220;=&#8221; has a higher precedence than &#8220;or&#8221; so your statement should always read &#8220;(b = nil) or 23&#8243;, which is always &#8220;23&#8243; and always assigns &#8220;nil&#8221; to &#8220;b&#8221;.</p>

<p>I have thought a while about a possible use case and could not come up with one, but I guess it will look like a long logical expression with lots of paranthesis, which may be written with less paranthesis, when regarding the operator precedence.</p>

<p>(not true &amp;&amp; false) #=&gt; true
b = (not true and false)  #=&gt; false</p>

<p>This difference could actually make sense in a logical expression</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Etapeta</title>
		<link>http://www.sofasportler.de/dirk.blog/articles/unequal-or/comment-page-1#comment-31338</link>
		<dc:creator>Etapeta</dc:creator>
		<pubDate>Mon, 22 Oct 2007 10:42:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.sofasportler.de/dirk.blog/articles/unequal-or#comment-31338</guid>
		<description>&lt;p&gt;I have the same behaviour.
It must depend on operators' precedence.&lt;/p&gt;

&lt;p&gt;While
a = nil &#124;&#124; 23
gets interpreted as we imagine,
b = nil or 23
gets interpreted as
(b = nil) or 23&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I have the same behaviour.
It must depend on operators&#8217; precedence.</p>

<p>While
a = nil || 23
gets interpreted as we imagine,
b = nil or 23
gets interpreted as
(b = nil) or 23</p>]]></content:encoded>
	</item>
</channel>
</rss>
