Comments on: Java is less magical than C# http://v1.ripper234.com/p/java-is-less-magical-than-c/ Stuff Ron Gross Finds Interesting Sun, 02 Aug 2015 11:03:35 +0000 hourly 1 https://wordpress.org/?v=4.5.3 By: Playing around with PLINQ and IO-bound tasks - .NET Code Geeks http://v1.ripper234.com/p/java-is-less-magical-than-c/comment-page-1/#comment-6488 Tue, 16 Oct 2012 16:03:58 +0000 http://v1.ripper234.com/?p=1123#comment-6488 […] threads, but it will only allocate two if it so chooses. This is yet another example of C# being more magical than Java – compared to Java's rich ExecutorService, PLINQ offers less fine grained control. However, further […]

]]>
By: Tomer Gabel http://v1.ripper234.com/p/java-is-less-magical-than-c/comment-page-1/#comment-1580 Fri, 21 Aug 2009 08:32:19 +0000 http://v1.ripper234.com/?p=1123#comment-1580 Both are valid languages, and both can teach you a lot about better software design. Most (though admittedly not all) of what you call magic in C# is well-documented and well-understood, and a good programmer will drill down and learn how things work regardless of whether it’s C#, Java, Haskell or C99 on an embedded Linux platform.

In my own opinion each has advantages, and while I prefer C# for writing mass amounts of concise, elegant code in a short time, Java is definitely preferable when it comes to robust software design. For example, despite their reputation I’ve come to rely on checked exceptions as a powerful mechanism for enforcing reliability on the code level. Other subtle differences, such as having to explicitly declare captured variables as final, can reduce a lot of hard-to-spot bugs. The Java collections and executors framework is also much, much more powerful.

On the other hand C# has a much better type system, and new language versions continually add features to aid robustness and increase productivity. I’m looking forward to preconditions and postconditions, variance rules for type parameters and other goodies. It is an interesting race for sure…

]]>
By: Ofer Egozi http://v1.ripper234.com/p/java-is-less-magical-than-c/comment-page-1/#comment-1579 Fri, 21 Aug 2009 07:42:01 +0000 http://v1.ripper234.com/?p=1123#comment-1579 Excellent post. It’s no accident that it’s not the other way around, Microsoft made this a habit long ago. Before .NET came along, there was MFC versus straight Win32 API calls. We used Win32 API, and whenever we interviewed someone who only used MFC you could sense how little understanding they have of how the magic works under the hood, knowledge which can be extremely useful in many cases. It’s the same thread that goes back to whether programmers should learn about operating systems internals and CPU logic.

]]>