Live data from Hacker News

Ask HN : Which should I learn : C# or Java

news.ycombinator.com

1–10 of 87 posts

Ask HN : Which should I learn : C# or Java

#1
I have been lurking on HN for some time now, and I have noticed that the languages of choice are python, lisp and ruby. However, I would prefer to learn either C# (and thus asp.net) or java. which one would be better? For the record, I have used php a lot, and code in c, c++ on the day job.

Re: Ask HN : Which should I learn : C# or Java

#2
I think as a language C# is superior to Java. That being said, learn Java. The open source community alone makes it a much more attractive platform to build apps on. The number of choices in terms of frameworks + no vendor lock in makes it a winner. If you're serious about learning it pick up a copy of Effective Java by Joshua Bloch -- by far the best general Java book out there.

Re: Ask HN : Which should I learn : C# or Java

#3
You're not going to find a clear answer one way or the other. If you enjoy working with Microsoft products, including Visual Studio, go for C#. If you like, or would like to learn, using other platforms, go for Java.

Keep in mind a lot of the value of Java is the JVM. It's everywhere now so it's kind of like a perl for enterprises.

Re: Ask HN : Which should I learn : C# or Java

#4
I'm in Silicon Valley - so this skews me a bit, but Java by far.

It does depend a bit on what you want to do, but most everything I see is sliding towards java. You can do web development, mobile (except iPhone) and though it hasn't fully caught on yet, I'm seeing more apps on the desktop in Java than in the past.

Re: Ask HN : Which should I learn : C# or Java

#5
If you are looking to only program for windows, C#. Stay away from java at all cost. Java is a career trap, and more importantly a destroyer of intellect. My roommate is a C# programmer and a system architect. Really smart and he makes close to $150k per year. Java would qualify you to flip French fries in comparison. Also, keep Objective C in mind. That opens up Mac and iPhone development to you. Macs are at 20% marketshare now, iPhones the best selling smart phone. Plus programming for Mac/iPhone is just fun. Further afield, look at languages like Erlang. The future of computing is hundreds and thousands of parallel cores and parallel languages like Erlang are in many ways increasingly important.

Re: Ask HN : Which should I learn : C# or Java

#6
Java, then Clojure. I've never used Clojure, but my understanding is that it's a Lisp dialect that targets the Java VM.

Do learn a language like Lisp, Ruby, or Ocaml, though. Once you get used to the functional paradigm, you'll realize how much more powerful these languages are, and you'll never go back.

Re: Ask HN : Which should I learn : C# or Java

#7

Java, then Clojure. I've never used Clojure, but my understanding is that it's a Lisp dialect that targets the Java VM. Do learn a language like Lisp, Ruby, or Ocaml, though. Once you get used to the functional paradigm, you'll realize how much more powerful these languages are, and you'll never go back.

Yup, you'll never look back! ...unless you need to get a job, of course...

Though Python is used more and more now, you can definitely get jobs in languages other than Java and C# and such... But sadly, not Lisp or Ocaml though, at least not easily.

Re: Ask HN : Which should I learn : C# or Java

#8
So you've learned C, and C++. Of Java and C#, you may as well continue learning them in that order to see how one tries to improve on its predecessor, though by now it's likely that Java has adapted some ideas from C# as well.

Oh, and learn Objective-C!

Re: Ask HN : Which should I learn : C# or Java

#9
post #2

I think as a language C# is superior to Java. That being said, learn Java. The open source community alone makes it a much more attractive platform to build apps on. The number of choices in terms of frameworks + no vendor lock in makes it a winner. If you're serious about learning it pick up a copy of Effective Java by Joshua Bloch -- by far the best general Java book out there.

Man I know that I'm gonna get burned for saying it, but java isn't all that it's cracked up to be. I've worked for two companies that are java-based and both experiences have been horrible. Except for a handful of people, every java "engineer" I've known has been a siv. The ones that rock happen to just know java in addition to experience in other languages. Point in case, we are implementing some new web apis soon. I have been extolling the benefits of JSON and REST. Friday, the manager/lead java dude that is in charge of our 10+ engineers and making critical technology decisions asks me, "So, what is JSON"? Oy...

Re: Ask HN : Which should I learn : C# or Java

#10
post #5

If you are looking to only program for windows, C#. Stay away from java at all cost. Java is a career trap, and more importantly a destroyer of intellect. My roommate is a C# programmer and a system architect. Really smart and he makes close to $150k per year. Java would qualify you to flip French fries in comparison. Also, keep Objective C in mind. That opens up Mac and iPhone development to you. Macs are at 20% mar…

I think the Systems Architect position earns that salary, not just a developer who uses that specific language. I don't think anybody is saying C# developers are paid badly, but that Java is open source in (I think) every way by now, and that means it will survive for a long time.

On the other hand, I'm never putting faith into Microsoft's development tools again, as nice as they are, because in recent history, Microsoft has killed off programming languages and tools at will, even their most popular ones. Microsoft makes developers depend on Microsoft's ability to update and improve their programming tools, in order to make the case they should charge for them, but has killed off popular programs or languages in order to concentrate on new ones, given that they themselves don't have resources to support all of them at once.

Post reply on HN