<?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: C# vs Java Part 1: The Languages (Continued)</title>
	<atom:link href="http://simpleprogrammer.com/2010/02/02/c-vs-java-part-1-the-languages-continued/feed/" rel="self" type="application/rss+xml" />
	<link>http://simpleprogrammer.com/2010/02/02/c-vs-java-part-1-the-languages-continued/</link>
	<description>Software Development from John Sonmez&#039;s Perspective</description>
	<lastBuildDate>Tue, 07 Feb 2012 17:47:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: jsonmez</title>
		<link>http://simpleprogrammer.com/2010/02/02/c-vs-java-part-1-the-languages-continued/#comment-2108</link>
		<dc:creator><![CDATA[jsonmez]]></dc:creator>
		<pubDate>Fri, 26 Aug 2011 03:19:20 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=292#comment-2108</guid>
		<description><![CDATA[CLR is currently ported.  Check out the Mono project.]]></description>
		<content:encoded><![CDATA[<p>CLR is currently ported.  Check out the Mono project.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cgotiear</title>
		<link>http://simpleprogrammer.com/2010/02/02/c-vs-java-part-1-the-languages-continued/#comment-2107</link>
		<dc:creator><![CDATA[cgotiear]]></dc:creator>
		<pubDate>Thu, 25 Aug 2011 03:07:24 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=292#comment-2107</guid>
		<description><![CDATA[From a Java Developer&#039;s propective - my hats off to everyone for being objective and very informative - I do have one question though - are there plans to port the CLR to other platforms like unix/linux?]]></description>
		<content:encoded><![CDATA[<p>From a Java Developer&#8217;s propective &#8211; my hats off to everyone for being objective and very informative &#8211; I do have one question though &#8211; are there plans to port the CLR to other platforms like unix/linux?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://simpleprogrammer.com/2010/02/02/c-vs-java-part-1-the-languages-continued/#comment-1827</link>
		<dc:creator><![CDATA[Robert]]></dc:creator>
		<pubDate>Wed, 13 Apr 2011 22:13:28 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=292#comment-1827</guid>
		<description><![CDATA[Any language you use will have different feature even if syntax and keywords are similar which mainly has to do with libraries available and compiler whether interpreted/compiled.
C# does have advantages but only do to the .Net library giving the language more functionality where JAVA depends on open source jars which Sun is kicking themselves in the booty due to making it open source in the first place (too late now).]]></description>
		<content:encoded><![CDATA[<p>Any language you use will have different feature even if syntax and keywords are similar which mainly has to do with libraries available and compiler whether interpreted/compiled.<br />
C# does have advantages but only do to the .Net library giving the language more functionality where JAVA depends on open source jars which Sun is kicking themselves in the booty due to making it open source in the first place (too late now).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jsonmez</title>
		<link>http://simpleprogrammer.com/2010/02/02/c-vs-java-part-1-the-languages-continued/#comment-125</link>
		<dc:creator><![CDATA[jsonmez]]></dc:creator>
		<pubDate>Mon, 15 Feb 2010 16:53:48 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=292#comment-125</guid>
		<description><![CDATA[Hi Chris,

You are correct about the generics.  I think C# is getting support for &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms173174(VS.80).aspx&quot; rel=&quot;nofollow&quot;&gt;contravariance and covariance&lt;/a&gt; in 4.0, which should all something that takes base type of a generic to take a subtype.

The Java enums are a bit heavy, but it is pretty useful when you need it.  I agree with you that there might be a better solution, but between the two I have to go with the Java implementation.]]></description>
		<content:encoded><![CDATA[<p>Hi Chris,</p>
<p>You are correct about the generics.  I think C# is getting support for <a href="http://msdn.microsoft.com/en-us/library/ms173174(VS.80).aspx" rel="nofollow">contravariance and covariance</a> in 4.0, which should all something that takes base type of a generic to take a subtype.</p>
<p>The Java enums are a bit heavy, but it is pretty useful when you need it.  I agree with you that there might be a better solution, but between the two I have to go with the Java implementation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://simpleprogrammer.com/2010/02/02/c-vs-java-part-1-the-languages-continued/#comment-124</link>
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Mon, 15 Feb 2010 04:48:54 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=292#comment-124</guid>
		<description><![CDATA[One thing you&#039;re missing from the Generics section which does favour Java is wildcards. Allows ArrayList to &quot;inherit&quot; (term used loosely) from ArrayList when Foo inherits from Bar.
I think c# 4.0 is getting something similar.

Also I disagree about Enums, as much as I&#039;m not a huge fan of C# Enums (too lightweight) I think Java ones are just as annoying but in a completely different way (too heavy).]]></description>
		<content:encoded><![CDATA[<p>One thing you&#8217;re missing from the Generics section which does favour Java is wildcards. Allows ArrayList to &#8220;inherit&#8221; (term used loosely) from ArrayList when Foo inherits from Bar.<br />
I think c# 4.0 is getting something similar.</p>
<p>Also I disagree about Enums, as much as I&#8217;m not a huge fan of C# Enums (too lightweight) I think Java ones are just as annoying but in a completely different way (too heavy).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: C# vs Java Part 2: The Platforms (Desktop and Mobile) &#171; Making the Complex Simple</title>
		<link>http://simpleprogrammer.com/2010/02/02/c-vs-java-part-1-the-languages-continued/#comment-85</link>
		<dc:creator><![CDATA[C# vs Java Part 2: The Platforms (Desktop and Mobile) &#171; Making the Complex Simple]]></dc:creator>
		<pubDate>Mon, 08 Feb 2010 08:02:24 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=292#comment-85</guid>
		<description><![CDATA[[...] C# vs Java Part 1: The Languages (Continued) [...]]]></description>
		<content:encoded><![CDATA[<p>[...] C# vs Java Part 1: The Languages (Continued) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blair Zajac</title>
		<link>http://simpleprogrammer.com/2010/02/02/c-vs-java-part-1-the-languages-continued/#comment-81</link>
		<dc:creator><![CDATA[Blair Zajac]]></dc:creator>
		<pubDate>Sat, 06 Feb 2010 22:01:01 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=292#comment-81</guid>
		<description><![CDATA[Following up to my comment in your previous post, here&#039;s the Scala code.

56.toString

Scala 2.8 has manifest types which allow you to reflect on the type parameter T so some of the examples you show there are possible.

Scala doesn&#039;t have checked exceptions.

Scala&#039;s for comprehensions allow you to write the kind of code that LINQ&#039;s magic is for.

val query = names.filter(_.length == 5).sorted.map(_.toUpperCase)

Scala has type inference so you don&#039;t need to specify types in many places.

Scala has implicits that let you add methods to any class and pick the scope where those additional methods are visible.  For example, Scala has a RichString class that has additional methods beyond String.  It&#039;s not like Ruby where if you extend a class the entire process sees those modifications, in Scala, the additional methods are only visible where you want them and it&#039;s done at compile time.

Regards,
Blair]]></description>
		<content:encoded><![CDATA[<p>Following up to my comment in your previous post, here&#8217;s the Scala code.</p>
<p>56.toString</p>
<p>Scala 2.8 has manifest types which allow you to reflect on the type parameter T so some of the examples you show there are possible.</p>
<p>Scala doesn&#8217;t have checked exceptions.</p>
<p>Scala&#8217;s for comprehensions allow you to write the kind of code that LINQ&#8217;s magic is for.</p>
<p>val query = names.filter(_.length == 5).sorted.map(_.toUpperCase)</p>
<p>Scala has type inference so you don&#8217;t need to specify types in many places.</p>
<p>Scala has implicits that let you add methods to any class and pick the scope where those additional methods are visible.  For example, Scala has a RichString class that has additional methods beyond String.  It&#8217;s not like Ruby where if you extend a class the entire process sees those modifications, in Scala, the additional methods are only visible where you want them and it&#8217;s done at compile time.</p>
<p>Regards,<br />
Blair</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jsonmez</title>
		<link>http://simpleprogrammer.com/2010/02/02/c-vs-java-part-1-the-languages-continued/#comment-73</link>
		<dc:creator><![CDATA[jsonmez]]></dc:creator>
		<pubDate>Thu, 04 Feb 2010 23:07:07 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=292#comment-73</guid>
		<description><![CDATA[You are correct.  This is kind of strange though.  In the CLI standard it says:

12.4.2.5 Overview of exception handling
See the exception handling specification in Partition II for details.
Each method in an executable has associated with it a (possibly empty) array of exception handling
information. Each entry in the array describes a protected block, its filter, and its handler (which shall be a
catch handler, a filter handler, a finally handler, or a fault handler). When an exception occurs, the CLI
searches the array for the first protected block that
• Protects a region including the current instruction pointer and
• Is a catch handler block and
• Whose filter wishes to handle the exception
&lt;strong&gt;If a match is not found in the current method, the calling method is searched, and so on. If no match is found
the CLI will dump a stack trace and abort the program.&lt;/strong&gt;
[Note: A debugger can intervene and treat this situation like a breakpoint, before performing any stack
unwinding, so that the stack is still available for inspection through the debugger. end note]
If a match is found, the CLI walks the stack back to the point just located, but this time calling the finally and
fault handlers. It then starts the corresponding exception handler. Stack frames are discarded either as this
second walk occurs or after the handler completes, depending on information in the exception handler array
entry associated with the handling block.

Yet, I have created a small program that does:

[sourcecode language=&quot;csharp&quot;]
try
            {
                Console.Out.WriteLine(&quot;In Try&quot;);
                throw new Exception();
            }
            finally
            {
                Console.Out.WriteLine(&quot;In Finally&quot;);
            }
[/sourcecode]

Which outputs:

In Try

Unhandled Exception: System.Exception: ...

In Finally

So it obviously does call the finally block.  I will update the post to reflect that.  Thanks for bringing that point up.]]></description>
		<content:encoded><![CDATA[<p>You are correct.  This is kind of strange though.  In the CLI standard it says:</p>
<p>12.4.2.5 Overview of exception handling<br />
See the exception handling specification in Partition II for details.<br />
Each method in an executable has associated with it a (possibly empty) array of exception handling<br />
information. Each entry in the array describes a protected block, its filter, and its handler (which shall be a<br />
catch handler, a filter handler, a finally handler, or a fault handler). When an exception occurs, the CLI<br />
searches the array for the first protected block that<br />
• Protects a region including the current instruction pointer and<br />
• Is a catch handler block and<br />
• Whose filter wishes to handle the exception<br />
<strong>If a match is not found in the current method, the calling method is searched, and so on. If no match is found<br />
the CLI will dump a stack trace and abort the program.</strong><br />
[Note: A debugger can intervene and treat this situation like a breakpoint, before performing any stack<br />
unwinding, so that the stack is still available for inspection through the debugger. end note]<br />
If a match is found, the CLI walks the stack back to the point just located, but this time calling the finally and<br />
fault handlers. It then starts the corresponding exception handler. Stack frames are discarded either as this<br />
second walk occurs or after the handler completes, depending on information in the exception handler array<br />
entry associated with the handling block.</p>
<p>Yet, I have created a small program that does:</p>
<pre class="brush: csharp;">
try
            {
                Console.Out.WriteLine(&quot;In Try&quot;);
                throw new Exception();
            }
            finally
            {
                Console.Out.WriteLine(&quot;In Finally&quot;);
            }
</pre>
<p>Which outputs:</p>
<p>In Try</p>
<p>Unhandled Exception: System.Exception: &#8230;</p>
<p>In Finally</p>
<p>So it obviously does call the finally block.  I will update the post to reflect that.  Thanks for bringing that point up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J</title>
		<link>http://simpleprogrammer.com/2010/02/02/c-vs-java-part-1-the-languages-continued/#comment-71</link>
		<dc:creator><![CDATA[J]]></dc:creator>
		<pubDate>Thu, 04 Feb 2010 22:35:36 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=292#comment-71</guid>
		<description><![CDATA[Your statement about finally blocks not running in C# is incorrect. Finally blocks run regardless of whether the try block throws an exception that is caught or uncaught.]]></description>
		<content:encoded><![CDATA[<p>Your statement about finally blocks not running in C# is incorrect. Finally blocks run regardless of whether the try block throws an exception that is caught or uncaught.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pop Catalin</title>
		<link>http://simpleprogrammer.com/2010/02/02/c-vs-java-part-1-the-languages-continued/#comment-69</link>
		<dc:creator><![CDATA[Pop Catalin]]></dc:creator>
		<pubDate>Thu, 04 Feb 2010 09:57:04 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=292#comment-69</guid>
		<description><![CDATA[Hey,
Stackoverflow podcast listener here. I guess it worked :) some traffic to your blog.]]></description>
		<content:encoded><![CDATA[<p>Hey,<br />
Stackoverflow podcast listener here. I guess it worked <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  some traffic to your blog.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

