HN2new | past | comments | ask | show | jobs | submitlogin

Java is painful after experiencing .NET. I'm not sure this is really news though.


I wouldn't describe it as painful myself. But, I would agree with sentiment. Having spent 3+yrs working with Java and then moving to C# (2yrs+ dev) has been a pleasant experience. C# is great language with features like delegates, Indexers, Pointers and Unsafe Code (executed in an unsafe context) and constraints on type parameters.

In contrast, I hate the msdn documentation for C# and still have a soft spot for java documentation.And yes, C# v Java is not the same as JVM v CLR


I hate the msdn documentation for C#

Not sure if this is addresses your complaint, but MSDN's low-bandwidth formatted site makes it easier to work with.

Example: http://msdn.microsoft.com/en-us/library/system.xml.xmlreader...

Here's a link to a bookmarklet you can use to turn loband on: http://weblogs.asp.net/jgalloway/archive/2008/08/30/msdn-low...


I think another thing I really hate about C# documentation is that it's merged with docs for other languages like VB.NET. It's a small thing but when I need to do something, I really don't want to be wasting time constantly filtering through stuff I don't need.


There is a language filter in order to display only language we want to see (in the standard version, not the low bandwidth one).


Thanks Rexxar - you've made my life easier. For some reason I've never noticed it before. Maybe it's because I use Firefox and the filter button looks really small on it.


In hindsight, hate was a bit strong. thanks for the bookmarklet. I too prefer the low-band version of the msdn. But I prefer java docs layout. It's a lot easier to use and navigate. With namespaces at the top, classes just below and method/class details as the main view. I think it's very elegant.


Delegates do it for me (even though VB.NET doesn't have delegate subs), especially their use with IEnumerable.


I should point out the obvious that C# was designed after Java was in the wild for some time; thus, Microsoft got to learn from the mistakes Java made when designing the language.


I disagree. Anders Hejlsberg was already an experienced language designer with the highly commercially successful Turbo Pascal and Delphi under his belt before he came to Microsoft and developed C#. James Gosling only had worked on Oak before Java, a language which never made it past the stage of an internal research project at Sun. It's disingenuous to say MS "copied" anyone in this case - they simply went out and found an experienced languages guru and hired him. Just like when they needed someone who knew about operating systems, they hired Dave Cutler from DEC.


Oak == Java 1.0. The first Java runtime beta that I installed on a Solaris box in 96 or so was called Oak.


I've been using Java on and off since around then (first paying gig in '96) and even at 0.9 it was called Java.


Java has made many design mistakes since C# was released. I keep thinking one day the Java folks are going to come out and say, "AHAHA, WE TROLLED YOU ALL BIG TIME", but sadly I doubt that is going to happen.


Some examples? I haven't used Java for a while now, so I'm asking in earnest.


Exactly. This is not news. C# has always been a step ahead of Java. They're both enterprise languages, good for large teams. But C# has always offered comparable features to Java as well as more higher level features. Add to this, albeit a subjective opinion, that VS is a superior IDE to Eclipse.


At my company about a year ago, we held a Java vs .NET seminar. The attendees were probably 10% .NET, 80% Java and 10% interested onlookers (like me). The main .NET guy stood up to speak. He said he'd done this project recently in Java and that project in C# and these were his experiences. He talked about the maturity of the tools, particularly VS vs Eclipse support for programming in the large, LINQ, he mentioned that in the Java world there were many competing frameworks whereas a C# developer could get up to speed on a project without having to learn a new one, a whole bunch of stuff. He was calm, articulate, prepared, and clearly had the attitude of "the right tool for the job" and "what's best for the company".

Then it was Java's turn. Their speaker hadn't prepared any examples, and he'd never used .NET. I scented blood in the water. This was going to be fun. It went something like this:

Him: Java is cross platform! Me: So what? We only use one platform for all Java, the Ops guys insist on it. Him: Java is used by lots of large companies including X, Y and Z Me: All of whom write their major products in C and C++ Him: You can use lots of languages on the JVM! Me: So the best thing about Java is that you don't have to use it? Is that all you got?

Then he prepared his killer blow:

Him: Java is not Microsoft! Me: Haha, OK you got me there. No wait, there's Mono...

IMHO right now Java should be considered a legacy language, and Java programmers either assigned to maintenance or those who are good, retrained (not necessarily in C#, there's Scala for example). The JVMs are generally good and if you need a VM language on Unix then worth considering (tho' there are other VMs out there). Personally, I would advise against starting a new project in Java.


IMHO right now Java should be considered a legacy language, and Java programmers either assigned to maintenance or those who are good, retrained

Why? If they are producing value where they are in a legacy language, why retrain them? If they are really good programmers, they will retrain themselves out of curiosity.

Good old computer languages are like comic book characters. They keep getting declared dead, but someone keeps bringing them back!

Now, whether Java is a good language is debatable. More relevant to the company is if it's a good project. If it is a good project producing quality output and value, leave it alone! There's no sense in changing languages just because it's a "new" technology. (In quotes because a lot of that stuff was developed in the 60's, and 70's by Bell, Xerox, and IBM R&D anyhow.)


There's no need to chuck away the old code if you stay on the JVM, remember. You can develop the new functionality in Scala, Groovy, Jython, Clojure, whatever you want. It's not about rewriting existing code, it's about getting a competitive advantage when writing new code.


Ouch.


When you move to Mono, many of the auxiliary arguments for C# fall apart. (no VS.NET on Linux, "enterprise support," yadda yadda)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: