views:

754

answers:

13

So I am a long time .Net developer looking to branch into something new to further my professional development. I have reduced the next language to learn as one of c++, Python or Ruby and want to hear everyone's thoughts on what I should pick, and why?

What trials and tribulations have others found when moving from c# onto one of these 3?

+9  A: 

I don't think any of those languages will teach you anything new with the possible exception of C++. I say this because despite syntactic differences and the odd operator, both are general purpose, multi-paradigm, OO-weighted, garbage collected languages.

C++ at least doesn't have garbage collection (normally).

So I'd suggest something a bit more exotic like F#, Erlang or Haskell. If not those then probably C++ or, better yet, C.

cletus
C? I'd say that was the one he'd learn the least from. It's basically what you get if you strip every interesting feature away from C#. C++ has far more to offer that'd be new to a C# programmer. Python would have quite a few tricks up its sleeve too, but I agree, no shocking new paradigms there.
jalf
Apart from that, I agree, learning a "proper" functional language is a good idea.
jalf
C is a procedural language. C#/C++ aren't (they're OO-ish). Being able to write robust, performant and elegant C IMHO has value.
cletus
cletus: “OO-ish” is just one facet of C++, and certainly the least interesting. It has many other facets. C, on the other hand, offers nothing over C#. Wow, it's procedural. How is that new to C# programmers?
Konrad Rudolph
Just because you can write good C# code that doesn't mean you can write good C. Have you ever written C for any non-trivial project?
cletus
I agree with "better yet, C". Comming from .Net, the benefits of learning a language of the C family will stand out more if you learn C than C++. (And I agree even more with "I'd suggest something a bit more exotic", and add Lisp!)
Sébastien RoccaSerra
+3  A: 

IronPython can make the move to Python easier for you - you can use your previous experience.

IronPython is a new implementation of the Python programming language running on .NET. It is well integrated with the rest of the .NET Framework and makes all .NET libraries easily available to Python programmers.

gimel
+3  A: 

It really depends on what you want to do with the language.

Something large? I'd head towards C++.

Something small and quick and fun? I'd head towards Python.

Want to play around with OO concepts? Ruby is your destination of choice.

Have fun!

HTH

cheers,

Rob

Rob Wells
A: 

If you're already fluent in C#, it shouldn't be hard for you to learn C++. It will definitely be a good investment for your career, but beware: it might make you want to stab yourself in the face after C#.

Python and Ruby, on the other hand, are different beasts. Learning one will definitely open up a new world for you, and I suggest you learn Python first. I'm saying this for no other reason than it being my favorite language. Otherwise, Ruby is just as good.

Can Berk Güder
A: 

I think the answer on this depends on what types of sample problems you want to try and solve while learning this new language, but in general I think you have them in the right order:

  1. C++ (or even C !) - pointers and heap management
  2. Python - IronPython on .NET perhaps
  3. Ruby
Tall Jeff
+19  A: 

C++.

Because it is hard. And annoying.

Because of pointers. Because of the 'delete' keyword.

C# is already high-level enough. Python and Ruby are like stratospherical.

With C++ you can move around bits and bytes and such. Have you ever flipped bits? You haven't lived until you've flipped bits.

You can learn more about what is really going on in software and operating systems.

C++ is my vote.

Alex Baranosky
"Back in my day", we flipped bits with `XOR ax,0x40`. C++ is already pretty high-level to some of us. :-)
Ben Blank
indubitably my dear Mr. Blank
Alex Baranosky
@Blank, ax ^= 0x40; Not sure how much different that is. =]
strager
If C++, I'd probably go with C++/CLI. It isn't that well known, but it is surprisingly powerful extension of C++. Especially with existing .NET knowledge, it may be interesting thing to learn.
Tomas Petricek
C++ will surely be harder, and newer as it differs from C# on all these aspects. But, unless you see yourself programming embedded systems on the future, I guess it will not be that useful.
Rodrigo
@petricek: C++/CLI destroys everything that is good in C++: standards-based, cross-platform, high-performance, versatile, ... Even trivial C++-compliant code does not compile in C++/CLI, so I can't see it as an extension of C++, it is a subset.
Also, C++ is sort of Windows native language, so it will let you understand a bit better what Windows is doing.
Rob K
A: 

Part of the dot NET WinForms is written in C using the WinAPI, and dot NET just "p invokes" the C DLL's.

So, start learn C/C++ with MFC. This can help to make tricks in dot NET.

Avram
As I mention in the comment below GordonG's answer, I think C++/CLI may be a good choice. Especially with existing .NET knowledge.
Tomas Petricek
@petricek think about "p invokes" http://msdn.microsoft.com/en-us/library/aa446536.aspx
Avram
+2  A: 

Just try writing something in all three. Nothing fancy, some simple stuff. After a week you will know which one you like better.

But if you don't want fun but do want knowledge, C++ is the best bet. Just because is so different and really useful.

Ruby is also good one but you'd have to go hardcore to learn new concepts. Try reading Rails sources :)

Python could do a lot and supported by huge community and I would recommend it more for beginners just because of that. Although it's too strict for my taste, even C++ tends to be more "free love" style.

vava
+4  A: 

I agree with Rob Wells. It depends on what kind of programming you're going to be doing. If you're doing big desktop applications, then go with C++. If you're doing web applications, Ruby would be a good choice (Ruby on Rails, perhaps?). Python would also be good if you're looking at Django. If you're interested in writing little scripts to make your life easier (a text manipulation language, if you will), I'd say go with Python.

Chris
+1  A: 

hi there

I really though this was gonna be full of answers like go for Ruby and Im suprised its not. Ruby and particularly with the well know Ruby on Rails framework, is really nice as a new language to learn, if you dont use TDD and MVC, this is a good way to learn it too, its quick and dynamic ( think c# 4).

I think I m not alone in this, check the alt.net podcast, they had a talk or two about ruby and one of the guys there actually jsut released a book called Ruby for .net developers

Hope it helps

Miau
+2  A: 

I'd just like to offer an alternative view to the "if you know C# then C++ will be easy" view. I think you'll be smashing your face into congnitive dissonance all over the place if you take that route: there are enough similarities between the two languages (because they have common ancestors) to feel like you know what's going on, then WHAM, something that looks like it should just work turns out to be totally different.

It's the reason I can't work in VB.Net - I still work from time to time in VBA (which is VB6 near-as-dammit) and switching between the two causes headaches.

Mike Woodhouse
C++ is not THAT similar to C#, imho
Alex Baranosky
+1  A: 

Hi,

I'd second the suggestion to learn something a bit more 'exotic' and modern - F# could be a good choice for you, since you already know .NET, so you'll be able to use the same libraries, while learning a new language.

The reason for learning F# is that it's not just a new language, but largely a different paradigm, and so it can teach you much more - a different way to think about problems that's however also useful if you'll continue to do C# programming for living. It also shows many ideas that influenced other languages (C# 3, Python) in a much purest form (though in a form that's still very practically useful).

T.

Tomas Petricek
A: 

Why don't you try Lua? It's easy to learn and is not Object Oriented, as it's based on Tables.

Rodrigo