Which is easier to program C# or Java?

Started by
7 comments, last by jpetrie 11 years ago

Hello, I am not trying to start a language war here. I am a c++ programmer, I wouldn't say I'm a pro, but I'm pretty good. It has been increasing clear to me that c++ is not as productive as languages such as c# and java.

I am looking to learn a second language and use it for things like making GUI applications quicker and easier than c++. The type of application that absolute speed of the application is not paramount, but making it quickly and easily is more important.

So it seems like for general purpose languages that strive for productivity, C# and Java are the top 2. Which is the easiest to use for making general purpose programs with GUI's?

If this post or signature was helpful and/or constructive please give rep.

// C++ Video tutorials

http://www.youtube.com/watch?v=Wo60USYV9Ik

// Easy to learn 2D Game Library c++

SFML2.2 Download http://www.sfml-dev.org/download.php

SFML2.2 Tutorials http://www.sfml-dev.org/tutorials/2.2/

// Excellent 2d physics library Box2D

http://box2d.org/about/

// SFML 2 book

http://www.amazon.com/gp/product/1849696845/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=1849696845&linkCode=as2&tag=gamer2creator-20

Advertisement

Hello, I am not trying to start a language war here.

Unfortunately that's not how it works. Language war initiated... tongue.png

I am looking to learn a second language and use it for things like making GUI applications quicker and easier than c++. The type of application that absolute speed of the application is not paramount, but making it quickly and easily is more important.

So it seems like for general purpose languages that strive for productivity, C# and Java are the top 2. Which is the easiest to use for making general purpose programs with GUI's?

From my limited experience, I've found C# to be more straightforward to create nice-looking GUI apps, and I still have nightmares about Java's horrible "swing" UI and painful implementation. I hear C# inherits some UI development aspects from Delphi (since it's the same guy behind both languages) and so I'd be more inclined to pick that one if I had to choose, but this is subjective. But I'm sure they both have good libraries and tools to create UI's. Have you tried giving each of them a little trial?

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

C# had an advantage of learning from Java's mistakes, as well as having a chief architect who previously worked on a Delphi language. C# has much more syntax sugar added in later versions, which shortens many statements. .NET runtime also seems to have an architectural advantage of being the runtime for any language compilable to IL instructions, while Java runtime is made just for Java.

All in all it comes down to getting used to it. Also the big part of ease of use is knowing your way around the libraries you need.

I don't think that's right. Java has languages built on topof the JVM such as: groovy clojure and scala. IIRC, those languages are built on top of the jvm IL. Java is just capable as .NET. And Java is just as capable as C#. Though I agree that their libraries are a mess and their new lambda expressions don't impress, that's still a personal issue and not technical reason of why one is better than the other.

Beginner in Game Development?  Read here. And read here.

 

Go for C#.

I make food from C# and use Java for hobby projects.

Personally, i hate how Java handles event listening and etc, on UI level. Writing a shitton of code instead of just passing one delegate.

+ Visual studio is way better than Eclipse, of course, Eclipse is the BEST (IMHO) free IDE out there.

Personally, I like Java for making games, but I use C# for anything really UI based because of Visual Studio's great drag and drop environment for building forms. Netbeans has a UI building environment and eclipse has plug-ins, neither of which I have tried, but I can really recommend Visual Studio for lots of professional, clean, well thought out tools that the other two free environments may be lacking.

Stay gold, Pony Boy.

Java seems to have more libraries for it, but it feels disorganized as a language to me. c# is my preference by far on Windows. There are lots of niceties that c# has for UI development such as WPF and even Windows forms. If you are going for linux though, maybe java is the better way to go. I am not sure of how much support mono has for UI development.

Edit: I should say that what I mean by disorganized is that there is always a lot of choices for any one thing and that it makes it difficult to decide how to proceed (at least for me).



Having used both, I'd say C# and Visual Studio combine for a much better experience building GUIs than Java and Swing/AWT. I know there are dozens of add-on libraries for Java so everyone's mileage may vary depending on which package they know to grab, but I just found the C# route so much more direct: everything you need is ready to go in a great IDE and the partial class system means that when you dive in to edit button code and hook up your functionality, you don't have to sift through the crazy GUI-initialization verbosity.

To be fair to Java, it really does suffer from being the earlier of the two: like people have pointed out, C# got to watch Java make its mistakes first. And Java GUIs (if you package the jar correctly) will be cross-platform more easily* than C# tools.

*JVM is more common on most non-PC platforms than Mono. There are solutions for almost any platform, but the number of steps to get a Java application running is definitely fewer on average.

Hazard Pay :: FPS/RTS in SharpDX (gathering dust, retained for... historical purposes)
DeviantArt :: Because right-brain needs love too (also pretty neglected these days)

This isn't a worthwhile discussion -- "easier" is highly subjective, and there's more to it than the language itself (for example, the toolchains are a huge factor). Try both and see which you find more appealing.

This topic is closed to new replies.

Advertisement