<?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: C#, the &#8220;and&#8221; operators and lazy evaluation</title>
	<atom:link href="http://thinkingeek.com/2009/10/12/c-the-and-operators-and-lazy-evaluation/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinkingeek.com/2009/10/12/c-the-and-operators-and-lazy-evaluation/</link>
	<description>In geek we trust</description>
	<lastBuildDate>Mon, 30 Apr 2012 23:12:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Vicne</title>
		<link>http://thinkingeek.com/2009/10/12/c-the-and-operators-and-lazy-evaluation/#comment-152</link>
		<dc:creator>Vicne</dc:creator>
		<pubDate>Sun, 19 Jun 2011 10:22:55 +0000</pubDate>
		<guid isPermaLink="false">http://thinkingeek.com/?p=121#comment-152</guid>
		<description>I think your workmate should really learn the meaning of bitwise operations.
The fact that C# knows both &amp; and &amp;&amp; is nothing &quot;Curious&quot;. It&#039;s been so for ages in C, C++, Java and other languages. These are two basically different operators, one is arithmetic and works on numbers seen in their binary form, while the other one is a conditional operator working in boolean values.
The fact that the single &amp; also works with boolean types is just a side-effect because booleans can be considered numbers with just one binary digit (btw, in C, the language has no &quot;boolean&quot; predefined data type so it is often defined as a synonym of int by a macro).
So I really think the conclusion is that your workmate should stop using &amp; for &amp;&amp; and reserve the single &amp; for binary calculations.
The same is true for &#124; vs &#124;&#124; by the way.
Best regards,
Vicne</description>
		<content:encoded><![CDATA[<p>I think your workmate should really learn the meaning of bitwise operations.<br />
The fact that C# knows both &amp; and &amp;&amp; is nothing &#8220;Curious&#8221;. It&#8217;s been so for ages in C, C++, Java and other languages. These are two basically different operators, one is arithmetic and works on numbers seen in their binary form, while the other one is a conditional operator working in boolean values.<br />
The fact that the single &amp; also works with boolean types is just a side-effect because booleans can be considered numbers with just one binary digit (btw, in C, the language has no &#8220;boolean&#8221; predefined data type so it is often defined as a synonym of int by a macro).<br />
So I really think the conclusion is that your workmate should stop using &amp; for &amp;&amp; and reserve the single &amp; for binary calculations.<br />
The same is true for | vs || by the way.<br />
Best regards,<br />
Vicne</p>
]]></content:encoded>
	</item>
</channel>
</rss>

