<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Do You Have a Case of var Guilt?</title>
	<atom:link href="http://simpleprogrammer.com/2010/05/05/do-you-have-a-case-of-var-guilt/feed/" rel="self" type="application/rss+xml" />
	<link>http://simpleprogrammer.com/2010/05/05/do-you-have-a-case-of-var-guilt/</link>
	<description>Software Development from John Sonmez&#039;s Perspective</description>
	<lastBuildDate>Thu, 17 May 2012 13:16:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Using Var + As, a Neat Little Trick &#171; Making the Complex Simple</title>
		<link>http://simpleprogrammer.com/2010/05/05/do-you-have-a-case-of-var-guilt/#comment-1482</link>
		<dc:creator><![CDATA[Using Var + As, a Neat Little Trick &#171; Making the Complex Simple]]></dc:creator>
		<pubDate>Fri, 17 Dec 2010 03:30:30 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=812#comment-1482</guid>
		<description><![CDATA[[...] consider var to actually be quite a useful language feature to reduce repetition and make your code slightly more flexible for refactoring, but I’ve always [...]]]></description>
		<content:encoded><![CDATA[<p>[...] consider var to actually be quite a useful language feature to reduce repetition and make your code slightly more flexible for refactoring, but I’ve always [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tion</title>
		<link>http://simpleprogrammer.com/2010/05/05/do-you-have-a-case-of-var-guilt/#comment-585</link>
		<dc:creator><![CDATA[Tion]]></dc:creator>
		<pubDate>Thu, 24 Jun 2010 23:05:35 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=812#comment-585</guid>
		<description><![CDATA[&quot;Perhaps I just like to repeat myself = new Perhaps I just like to repeat myself.&quot;

Actually made me laugh out loud! thankfully no one is around.  Great post!]]></description>
		<content:encoded><![CDATA[<p>&#8220;Perhaps I just like to repeat myself = new Perhaps I just like to repeat myself.&#8221;</p>
<p>Actually made me laugh out loud! thankfully no one is around.  Great post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas Jydebjerg</title>
		<link>http://simpleprogrammer.com/2010/05/05/do-you-have-a-case-of-var-guilt/#comment-449</link>
		<dc:creator><![CDATA[Andreas Jydebjerg]]></dc:creator>
		<pubDate>Wed, 19 May 2010 08:08:24 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=812#comment-449</guid>
		<description><![CDATA[For me your caveat says it all. The need for the ide to be able to supply you with the type information is a clear indicator that you need to know the type information. I feel that if you cannot read/write the code without the ide you did something wrong. Don&#039;t get me wrong, I love the ide, I love the productivity gain, but I also love being able to use my skills even with inferior tooling. Personally I&#039;m in agreement with Dejan, using var when the initialization clearly shows you what type your using is fine, but using var for every declaration does in my opinion makes your code harder to read because you have to backtrack to discover what types are in play.]]></description>
		<content:encoded><![CDATA[<p>For me your caveat says it all. The need for the ide to be able to supply you with the type information is a clear indicator that you need to know the type information. I feel that if you cannot read/write the code without the ide you did something wrong. Don&#8217;t get me wrong, I love the ide, I love the productivity gain, but I also love being able to use my skills even with inferior tooling. Personally I&#8217;m in agreement with Dejan, using var when the initialization clearly shows you what type your using is fine, but using var for every declaration does in my opinion makes your code harder to read because you have to backtrack to discover what types are in play.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Wygant</title>
		<link>http://simpleprogrammer.com/2010/05/05/do-you-have-a-case-of-var-guilt/#comment-446</link>
		<dc:creator><![CDATA[Dan Wygant]]></dc:creator>
		<pubDate>Thu, 13 May 2010 07:55:31 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=812#comment-446</guid>
		<description><![CDATA[Ok, wild.... even the code definition window will work with the var keyword... bizzzzzarre!

I typically like to click the variable, hit F12, then click the type, and hit Ctl+\+d (control backslash d) to show the type def (frequently from metadata) in the Code Definition Window... or just F12 again.

But I was shocked when I changed Uri to var, hit Ctl+Sh+b (compile) and then hovered over the var ... hit Ctl+\+d and there was Uri (from metadata) in the Code Definition Window... what a shocker.

I&#039;m so confused! this seems just wrong from a best-practice standpoint, but totally Rock-N-Roll from the standpoint of how crappy JavaScript is regarding F12. It almost reels C# into VB territory... perhaps we&#039;ll see something interesting now for C# like in VB now with COM interop.... perhaps I&#039;m missing it and this IS it.

Dan &quot;Stoic Strong Type&#039;r&quot; Wygant]]></description>
		<content:encoded><![CDATA[<p>Ok, wild&#8230;. even the code definition window will work with the var keyword&#8230; bizzzzzarre!</p>
<p>I typically like to click the variable, hit F12, then click the type, and hit Ctl+\+d (control backslash d) to show the type def (frequently from metadata) in the Code Definition Window&#8230; or just F12 again.</p>
<p>But I was shocked when I changed Uri to var, hit Ctl+Sh+b (compile) and then hovered over the var &#8230; hit Ctl+\+d and there was Uri (from metadata) in the Code Definition Window&#8230; what a shocker.</p>
<p>I&#8217;m so confused! this seems just wrong from a best-practice standpoint, but totally Rock-N-Roll from the standpoint of how crappy JavaScript is regarding F12. It almost reels C# into VB territory&#8230; perhaps we&#8217;ll see something interesting now for C# like in VB now with COM interop&#8230;. perhaps I&#8217;m missing it and this IS it.</p>
<p>Dan &#8220;Stoic Strong Type&#8217;r&#8221; Wygant</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jsonmez</title>
		<link>http://simpleprogrammer.com/2010/05/05/do-you-have-a-case-of-var-guilt/#comment-433</link>
		<dc:creator><![CDATA[jsonmez]]></dc:creator>
		<pubDate>Mon, 10 May 2010 16:39:30 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=812#comment-433</guid>
		<description><![CDATA[Good point, I still wonder in the first case do you actually need to know the type?  You really just need to know the methods available on the type.  Think about how we use interfaces.  The same would apply about someone changing the type.]]></description>
		<content:encoded><![CDATA[<p>Good point, I still wonder in the first case do you actually need to know the type?  You really just need to know the methods available on the type.  Think about how we use interfaces.  The same would apply about someone changing the type.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dejan Radovic</title>
		<link>http://simpleprogrammer.com/2010/05/05/do-you-have-a-case-of-var-guilt/#comment-432</link>
		<dc:creator><![CDATA[Dejan Radovic]]></dc:creator>
		<pubDate>Mon, 10 May 2010 16:20:46 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=812#comment-432</guid>
		<description><![CDATA[There&#039;s no repetition in:
    int lastCharIndex = toReverse.Lenght - 1
as opposed to:
    Dictionary&lt;int, Dictionary&gt; lookup = new Dictionary&lt;int, Dictionary&gt;();

I&#039;d rather use var in the 2nd case where initialization and declaration match. In the 1st case, the type might not always be evident without using the mouse - like in this example:
    var table = GetBindingsTable();

And a second concern about the loose coupling: are you not afraid that one day you&#039;ll get the wrong type because somebody else change a method and the compiler will not warn you just because it happens to have the same public API? I&#039;m afraid that this could introduce subtle bugs...]]></description>
		<content:encoded><![CDATA[<p>There&#8217;s no repetition in:<br />
    int lastCharIndex = toReverse.Lenght &#8211; 1<br />
as opposed to:<br />
    Dictionary&lt;int, Dictionary&gt; lookup = new Dictionary&lt;int, Dictionary&gt;();</p>
<p>I&#8217;d rather use var in the 2nd case where initialization and declaration match. In the 1st case, the type might not always be evident without using the mouse &#8211; like in this example:<br />
    var table = GetBindingsTable();</p>
<p>And a second concern about the loose coupling: are you not afraid that one day you&#8217;ll get the wrong type because somebody else change a method and the compiler will not warn you just because it happens to have the same public API? I&#8217;m afraid that this could introduce subtle bugs&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jsonmez</title>
		<link>http://simpleprogrammer.com/2010/05/05/do-you-have-a-case-of-var-guilt/#comment-429</link>
		<dc:creator><![CDATA[jsonmez]]></dc:creator>
		<pubDate>Fri, 07 May 2010 18:13:19 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=812#comment-429</guid>
		<description><![CDATA[Good call! Done!]]></description>
		<content:encoded><![CDATA[<p>Good call! Done!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce Lindsay</title>
		<link>http://simpleprogrammer.com/2010/05/05/do-you-have-a-case-of-var-guilt/#comment-428</link>
		<dc:creator><![CDATA[Bruce Lindsay]]></dc:creator>
		<pubDate>Fri, 07 May 2010 18:05:22 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=812#comment-428</guid>
		<description><![CDATA[Nice.  I can relate to feeling this way at first too.  Now it&#039;s time to change your &#039;Email Me&#039; section to use var for your stringbuilder reference!]]></description>
		<content:encoded><![CDATA[<p>Nice.  I can relate to feeling this way at first too.  Now it&#8217;s time to change your &#8216;Email Me&#8217; section to use var for your stringbuilder reference!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jsonmez</title>
		<link>http://simpleprogrammer.com/2010/05/05/do-you-have-a-case-of-var-guilt/#comment-425</link>
		<dc:creator><![CDATA[jsonmez]]></dc:creator>
		<pubDate>Fri, 07 May 2010 12:57:37 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=812#comment-425</guid>
		<description><![CDATA[Did you just javascript rick roll me?  Actually it is pretty interesting to look at it that way without even having the vars.  Is the value in immediately knowing on a line if a variable is being delared or not?  I&#039;m not sure.]]></description>
		<content:encoded><![CDATA[<p>Did you just javascript rick roll me?  Actually it is pretty interesting to look at it that way without even having the vars.  Is the value in immediately knowing on a line if a variable is being delared or not?  I&#8217;m not sure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://simpleprogrammer.com/2010/05/05/do-you-have-a-case-of-var-guilt/#comment-424</link>
		<dc:creator><![CDATA[Tim]]></dc:creator>
		<pubDate>Fri, 07 May 2010 08:49:41 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=812#comment-424</guid>
		<description><![CDATA[So, why not:

01	public string reverse(string toReverse)
02	{
03	    reversed = &quot;&quot;;
04	    lastCharacterIndex = toReverse.Length -1;
05	    firstCharacterIndex = 0;
06	    for(index = lastCharacterIndex; index &gt;= firstCharacterIndex; index--)
07	    {
08	        letter = toReverse[index];
09	        reversed += letter;
10	    }
11	 
12	    return reversed;
13	}]]></description>
		<content:encoded><![CDATA[<p>So, why not:</p>
<p>01	public string reverse(string toReverse)<br />
02	{<br />
03	    reversed = &#8220;&#8221;;<br />
04	    lastCharacterIndex = toReverse.Length -1;<br />
05	    firstCharacterIndex = 0;<br />
06	    for(index = lastCharacterIndex; index &gt;= firstCharacterIndex; index&#8211;)<br />
07	    {<br />
08	        letter = toReverse[index];<br />
09	        reversed += letter;<br />
10	    }<br />
11<br />
12	    return reversed;<br />
13	}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

