Live data from Hacker News

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

news.ycombinator.com

31–40 of 87 posts

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

#31
post #27
post #24

Earlier quoted context omitted.

Nobody can. But then, C# isn't easy to start with. "The least painful" is what I would say.

I'll bite again. What makes C# so difficult to start with? I seriously want to know what obstacles are out there for people interested in starting with C#.

C# by itself isn't terribly difficult, other than its constantly balooning specification. A lot of the percieved difficulty with C# today comes from the rapid shifts in direction from Microsoft in terms of the "Microsoft Way" of using it. A prime example is the DLinq / Linq to SQL / ADO.Net Entities fiasco that's occurred in the past 5 or 6 months; Microsoft is trying to react quickly, but in doing so is crossing its own streams.

Of course, these are all really .Net problems, but more often than not, C# and .Net are used interchangeably.

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

#32
Have you considered learning both? They have a lot in common, and 'which one is better' is a decision you need to make for yourself in the context of your project.

Oddly enough, geography might matter. For example, Seattle seems to have a bunch of consulting shops and even a few product startups using MS tools. (There are also startups using the usual suspects...Java, PHP, Python, Ruby,...).

Both languages' VMs are accessible to a number of other languages if you decide to branch out later. As many have said already, Java gets a slight leg up from open source.

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

#33
Why would you only learn one of them? Learn every language you can. Learn them well enough to love and hate each for 5 different reasons. Learn them well enough to know which should be used when.

IMHO: they are very similar languages with converging library offerings. I think Java is ahead of the game in this regard because it's been "in the wild" longer and has more of an open source following.

And don't forget, they can interop very easily with SpringFramework and XML-RPC.

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

#34
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.

Learn Scala: http://www.scala-lang.org

Exactly. If you need to use Java for some reason, like getting at their libraries, you will do well to use anything other than the Java language. The platform is good. The language is 20 years behind the state of the art. Unless you are forced to work with other people that can't learn a language other than Java, there is no point in using it. I lean in the direction of Clojure, but lately the constant fanboi-ing is really putting me off.

C# is similar -- F# is a much better way of interacting with .Net libraries. It is even "fully-supported" by Microsoft from what I've read, so it is definitely a good alternative to C# if you prefer its functional style. (And who doesn't?)

Finally, if you don't need Java or .Net libraries, SBCL is a very nice Common Lisp implementation. It's fast, and if you like emacs, the tools are great. It is quickly becoming my favorite environment. (Perl is my other favorite.)

Despite what others say, you can write maintainable and well-performing code in any of these languages. So pick one and get started... that's the hardest part.

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

#35
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.

[deleted]

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

#36
Java was a great choice of language to learn 10 years ago. c# was a mediocre choice to learn 5 years ago.

In terms of employability, they both have enclaves of popularity around the world.

Java would be my recommendation, if limited to those two.

However there are better languages around today including those already mentioned.

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

#37

Earlier quoted context omitted.

Learn Scala: http://www.scala-lang.org

Agreed. As a language, Scala is superior to both C# and Java. It's open source and it has the advantage of being compatible with Java's platform, environment, and libraries.

+1 Scala. Open JVM, open compiler, open libraries, open language design/research community, and 3 books on the way. More importantly, Java and C# are throwing in lots of functional programming features after the fact. They will likely never have the uniform object/functional model Martin Odersky has already achieved in Scala.

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

#38
post #16
post #10

Earlier quoted context omitted.

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, Micro…

I assume you're mostly referring to VB6 being EOL'd. Any other examples?

Yes, Visual Basic was maybe the most popular language at the time they killed the product. Imagine picking the platform (VB6) that is supported on any computer that mattered (at the time, Windows), compiles to native code, and is also the most popular language. On top of that, your users don't need to download a 30MB .NET Framework that's in beta over a slow dial-up connection. And then, Microsoft kills it! If I'm going to invest time to create software in a popular language, it's not going to be a closed one again.

Microsoft also recently killed scripting and macro support in the latest version of Mac Office, so I imagine if you're a developer on either the Windows or Mac platform and want to script an Access Database, Excel spreadsheet, or Word Macro, you're screwed. It means you can't functionally use previously-created files any more, or use files from Windows users that use scripting. It's almost like Microsoft is helping users and developers migrate to other tools and platforms.

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

#40
post #31
post #27

Earlier quoted context omitted.

I'll bite again. What makes C# so difficult to start with? I seriously want to know what obstacles are out there for people interested in starting with C#.

C# by itself isn't terribly difficult, other than its constantly balooning specification. A lot of the percieved difficulty with C# today comes from the rapid shifts in direction from Microsoft in terms of the "Microsoft Way" of using it. A prime example is the DLinq / Linq to SQL / ADO.Net Entities fiasco that's occurred in the past 5 or 6 months; Microsoft is trying to react quickly, but in doing so is crossing its…

You're exactly right, those are .NET problems not specific to a language, and not really problems for a hacker. There are multiple open source ORMs that take full advantage of the language features (like LINQ) and aren't subject to MS's whims.

I think that "constantly balooning specification" is an overstatement. Look at the release timeline:

  - 2002: Version 1 (with VS.net 2002)  
  - October 2005: Version 2 (with VS2005)  
  - November 2007: Version 3 (with VS2008)  
  - Oct/Nov 2009 (I'm guessing): Version 4 (with VS2010)
Four versions over that span is hardly "constantly balooning". The .NET framework revs slightly more often with SPs, but major versions are on about the same pace.
Post reply on HN