<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Why I Prefer C# to Java (The Language)</title>
	<link>http://www.jeffperrin.com/index.php/2006/12/04/why-i-prefer-c-to-java-the-language/</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Sat, 17 May 2008 10:01:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.3</generator>

	<item>
		<title>by: Mike</title>
		<link>http://www.jeffperrin.com/index.php/2006/12/04/why-i-prefer-c-to-java-the-language/#comment-3638</link>
		<pubDate>Sun, 10 Dec 2006 18:34:24 +0000</pubDate>
		<guid>http://www.jeffperrin.com/index.php/2006/12/04/why-i-prefer-c-to-java-the-language/#comment-3638</guid>
					<description>My main issue with C# is the platform that you have to serve it up on.</description>
		<content:encoded><![CDATA[<p>My main issue with C# is the platform that you have to serve it up on.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Sam Smoot</title>
		<link>http://www.jeffperrin.com/index.php/2006/12/04/why-i-prefer-c-to-java-the-language/#comment-3627</link>
		<pubDate>Sat, 09 Dec 2006 05:50:43 +0000</pubDate>
		<guid>http://www.jeffperrin.com/index.php/2006/12/04/why-i-prefer-c-to-java-the-language/#comment-3627</guid>
					<description>I asked the title question at the last Ruby Group I went to. The answer there was ease of deployment.

In my work the need to explicitly dispose of an object (as opposed to letting the finalizer do the work) using the using() statement is pretty rare. I think excess usage of using() may be a form of premature optimization, but that's just me. There are some cases such as IO and Database Connections that it's a good standard to follow, but those should probably be abstracted anyways.

Properties are actually a sort spot on my list. :-) It's so very difficult to do lots of cool things when people go around writing non-virtual-by-default Properties for everything. And 99% of the time they're just getters and setters.

I read a post by someone much smarter than me once that basically said that if you've got a DataTransferObject on your hands, skip the getters/setters and just use Fields. This was in regards to Java by the way. Being a c# guy I instantly cringed at the idea, but those ThoughtWorks guys are generally a pretty smart bunch so I gave it some consideration and realized that... wow... yes, there's downsides to the idea, but imagine the upsides. *MUCH* less code (even if it is code-genned by Resharper, it's still ugly and tedious) and it really simplifies reflective magic since you don't have to decide between a Property that may have unintended side-effects (since you don't have knowledge of it until runtime), or a private field that requires a reduced security level.

Sorry for rambling. The point was, if it's a DTO, use Public Fields. I buy that.

If it's not a DTO, then Fields should be shy, and Properties rare, so to be honest the setTimeout(300) vs Timeout = 300 doesn't really bother me much one way or another.

The important part is that neither are Ruby when it comes to getters/setters, so it's just splitting hairs from that perspective. :-)</description>
		<content:encoded><![CDATA[<p>I asked the title question at the last Ruby Group I went to. The answer there was ease of deployment.</p>
<p>In my work the need to explicitly dispose of an object (as opposed to letting the finalizer do the work) using the using() statement is pretty rare. I think excess usage of using() may be a form of premature optimization, but that&#8217;s just me. There are some cases such as IO and Database Connections that it&#8217;s a good standard to follow, but those should probably be abstracted anyways.</p>
<p>Properties are actually a sort spot on my list. :-) It&#8217;s so very difficult to do lots of cool things when people go around writing non-virtual-by-default Properties for everything. And 99% of the time they&#8217;re just getters and setters.</p>
<p>I read a post by someone much smarter than me once that basically said that if you&#8217;ve got a DataTransferObject on your hands, skip the getters/setters and just use Fields. This was in regards to Java by the way. Being a c# guy I instantly cringed at the idea, but those ThoughtWorks guys are generally a pretty smart bunch so I gave it some consideration and realized that&#8230; wow&#8230; yes, there&#8217;s downsides to the idea, but imagine the upsides. *MUCH* less code (even if it is code-genned by Resharper, it&#8217;s still ugly and tedious) and it really simplifies reflective magic since you don&#8217;t have to decide between a Property that may have unintended side-effects (since you don&#8217;t have knowledge of it until runtime), or a private field that requires a reduced security level.</p>
<p>Sorry for rambling. The point was, if it&#8217;s a DTO, use Public Fields. I buy that.</p>
<p>If it&#8217;s not a DTO, then Fields should be shy, and Properties rare, so to be honest the setTimeout(300) vs Timeout = 300 doesn&#8217;t really bother me much one way or another.</p>
<p>The important part is that neither are Ruby when it comes to getters/setters, so it&#8217;s just splitting hairs from that perspective. :-)
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Jeff Perrin</title>
		<link>http://www.jeffperrin.com/index.php/2006/12/04/why-i-prefer-c-to-java-the-language/#comment-3471</link>
		<pubDate>Wed, 06 Dec 2006 00:36:42 +0000</pubDate>
		<guid>http://www.jeffperrin.com/index.php/2006/12/04/why-i-prefer-c-to-java-the-language/#comment-3471</guid>
					<description>Simon, you are right of course. There are good points to checked exceptions. However I've yet to hear of anyone in the .NET world complain about lacking them, which says a lot I guess.</description>
		<content:encoded><![CDATA[<p>Simon, you are right of course. There are good points to checked exceptions. However I&#8217;ve yet to hear of anyone in the .NET world complain about lacking them, which says a lot I guess.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Simon</title>
		<link>http://www.jeffperrin.com/index.php/2006/12/04/why-i-prefer-c-to-java-the-language/#comment-3468</link>
		<pubDate>Tue, 05 Dec 2006 16:22:38 +0000</pubDate>
		<guid>http://www.jeffperrin.com/index.php/2006/12/04/why-i-prefer-c-to-java-the-language/#comment-3468</guid>
					<description>Checked exception isn't necessarily a bad thing.  For example, it could serve as part of the API for a library.  The problem you mentioned in our project, on the other hand, is totally a design flaw.  ValidationException should absolutely be an UNCHECKED exception!</description>
		<content:encoded><![CDATA[<p>Checked exception isn&#8217;t necessarily a bad thing.  For example, it could serve as part of the API for a library.  The problem you mentioned in our project, on the other hand, is totally a design flaw.  ValidationException should absolutely be an UNCHECKED exception!
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
