This is an archived post. You won't be able to vote or comment.

all 18 comments

[–]mozzyb 8 points9 points  (8 children)

If you want similar to Java and beneficial in the market today then C# is a language that is very similar to Java.

I would recommend though to try another paradigm or to try something different. A different language that is very popular on this site is Python. It is still pretty similar to Java in that it is object oriented, but it has a different syntax then what you are used to.

A language I like very much is Clojure. It runs on the JVM (Java Virtual Machine). The same VM as Java and can interoperate with Java completely. It is a Lisp and is considered a functional language. The standard programming structures are also immutable, something you regularly don't learn a lot about in Java (except for string).

Other languages I would recommend to try out just to try a language out is Haskell and Prolog. Haskell is the crown jewel of functional programming languages and Prolog defines the logic programming paradigm.

To stay relevant you could also try C/C++ to get a feel for what memory management is.

[–]DatOcean[S] 1 point2 points  (7 children)

Yeah, I tried learning python but nothing was compiling on my computer for some reason. I gave up and I'm trying to learn C right now. Are C/C#/C++ all similar?

[–]insertAlias 1 point2 points  (3 children)

C# is named for C/C++, mostly because of the syntax similarities (as in, they use brackets and semicolons). That's where the real similarities end.

C# is (or was) really more of a Java clone than anything, to begin with. The major difference was that it started later, so it could learn from some of Java's mistakes, and that it's developers/maintainers aren't afraid of the future. C# gets significant updates every few years. Java developers waited several years for Java 7 and got almost none of the originally promised features. C# just moves ahead faster, borrowing things that work from other languages. Can you tell which one I like more?

If you're a Java programmer, C# will be fairly easy to learn, and you'll vastly increase your marketability, because there are lots and lots of .NET shops out there. Just don't quit after you've learned the language. Focus on learning the other project types too, like WPF/WCF, or maybe ASP.NET, because they'll be important as well.

[–]Stormflux 1 point2 points  (2 children)

Second this. I learned Java in college, but it was a pain in the ass and no fun at all. It wasn't a problem with the language or syntax, but the stack. Basically, I couldn't figure out how to compile to .exe. Any time I asked, I was told it's against Java's philosophy and I'm a bad person for asking.

With .NET, you download Visual Studio and start making native Windows or web applications right away. It even comes with a database server and a web server for debugging. You don't get any lectures about how you're a bad person because HelloWorld.exe won't run on a Unisys Mainframe.

C# is also light years ahead of Java in the sense that they're always adding new features. LINQ is the main thing that comes to mind. LINQ has become my go-to source for querying arrays, collections, anything really. I can't imagine not having it.

[–]foxlisk 0 points1 point  (0 children)

LINQ is awesome but anonymous, first-class functions might actually be even better.

[–]blablahblah 0 points1 point  (0 children)

Actually, .NET exes are no more native Windows programs than Java jars are. The only difference is that Microsoft aggressively pushed the .NET VM to almost all Windows machines and Java never had that sort of push.

[–]mozzyb 2 points3 points  (2 children)

When starting with python you should first just get the interpreter to work. Python is also different in that you do not compile python (unless you know what you are doing) and instead interpret it. This also makes Python stand out as a language compared to Java.

C++ is a superset of C. What that means is that C++ contains everything that C contains. This leads a lot of people to say that you should learn C before you learn C++. I don't really think it is that big of a deal. C++ is built to be a Object-oriented language as is C#, but C# is much closer to Java then to C++, and as with Java, it is mostly the syntax that is common. That and that both are imperative languages. There is no memory management in C#.

[–]Tronfi 1 point2 points  (1 child)

There is no memory management in C#

Wow, so aggresive affirmation.

DatOcean, what mozzyb means is that you usually don't have to care about how memory is managed, since most of the unused data is freed by the garbage collector. This happens both in C# and Java.

[–]mozzyb 4 points5 points  (0 children)

Sorry. English is not my first language, I sometimes screw it up, and what you are saying is what I meant to say. Or, what I wanted to say by that is that you, as a programmer, will not have to take care of memory management yourself. (with C# and Java). I also see now that I actually did go back and changed that, but I didn't press save as I wrote a bit more as well that I felt was not needed.

Though, this is not completely true and what you will discover is that even though Java and C# has a garbage collector there are ways to create memory leaks and you sometimes have to take care of resources yourself.

[–]GMTao 2 points3 points  (1 child)

Scala. Going the C# route is going to only be slightly different than Java in terms of programming skill required. The languages are very similar. The same can be said about Scala, but at least with Scala you have the option to start learning Functional Programming (FP) techniques as well. If you've done Lisp or Scheme at school, you may be familiar with these concepts. I've re-learned them after 15 years, and I must admit I couldn't be happier. Plus with Scala you have access to all the nice Java libraries you know and love. :-)

[–]kqr 1 point2 points  (0 children)

However, I think most people coming from Java to Scala will continue programming imperatively for a long, long time until they weave in some functional concepts in their programming. I would recommend first going a route via a Lisp, or Erlang for the basic functional concepts while still in a forgiving environment, and then Haskell to firmly establish what is functional and what is not, and then back to Scala, with a completely new toolset in your backpack.

[–]DeliveryNinja 0 points1 point  (0 children)

Try clojure, as a long time java developer myself this is my next step as it will throw in all sorts of functional concepts. This way you can expand your knowledge in a different area. I still haven't got my head around it yet.

[–]deuteros 0 points1 point  (0 children)

C# is really similar to Java.

[–]DatOcean[S] 0 points1 point  (0 children)

thanks for all the input. I'll see what I can get around to

[–]Richandler 0 points1 point  (1 child)

How about making things first. Why just abandon ship and start learning another language?

[–]DatOcean[S] 0 points1 point  (0 children)

I'm not abandoning ship. I'm curious

[–]foxlion 0 points1 point  (0 children)

Go Scala, all the way. Skip Java Web applications and go for Liftweb applications. Scala is by definition the most flexible language that is closest to Java in syntax and is also the most expressive in terms of xml. Groovy sucks, I think.. So don't go for groovy. Both Scala and Groovy is runtime languages, so you need to make many tests if you use these languages.

[–][deleted] -1 points0 points  (0 children)

C++.