views:

822

answers:

18

I know C# and VB and want to learn a new language soon, but I don't want to learn something which is 'just like C# or VB but a bit different'. Ruling out Java for example (I already know a bit anyway).

What's a good language to try? Should I go for an interpreted language like python, ruby, or PHP, or will I learn more from a lower-level language like C? Will C be too 'heavy' for evening learning?

Whatever your suggestion, could you link to a good resource or two?

I don't really have a purpose for learning a new language, so good mini-project ideas would also be welcome!

+3  A: 

Scheme or Haskell or SML/OCaml

Or if you are really brave, Prolog :)

leppie
Been playing with scheme and Haskell lately, these will really make you look at writing software differently. I found that it helps in writing C# too ^1 from me
Mendelt
+20  A: 

It's nice to know C, to give you a good grasp of what's happening at a lower level.

On the other hand, learning a functional language will almost certainly change how you write C# - particularly if you're using C# 3.

I'd suggest learning F# - that way you really will be primarily learning a new language (and idiom/metaphor/paradigm/buzzword) rather than a whole new platform. You can still use the .NET framework you're already familiar with.

Jon Skeet
+5  A: 

Ruby would be a good choice as a dynamic language.

F# would be a good choice for a functional language as you can leverage your existing knowledge of the .NET framework.

Garry Shutler
+16  A: 

Scheme.

It's a completely different world, and there are some excellent resources freely available. Notably, SICP (The Structure and Interpretation of Computer Programs) which is freely available here: http://mitpress.mit.edu/sicp/ (although I'd recommend the paperback).

But more importantly, there are some excellent SICP video lectures by Abelson and Sussman available here: http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/

If you watch the videos, you'll learn Scheme in the first few hours, and gain a firm foundation in Computer Science by the end.

And, once you know Scheme, learning other functional languages (like F#, or Haskell) will be a breeze.

Michael Dorfman
Funny how I said Scheme first, yet you get upvoted, and I get downvoted...
leppie
I think that's because I added the links to SICP and the videos. I also tried to give some reasons as to why I thought Scheme was a good choice....
Michael Dorfman
Thanks for the good links, I'm going to check these out over the weekend :-)
Matthew Rathbone
I can't recommend the videos highly enough. It's probably the best 20-hour introduction to Computer Science you could hope for. If you have the time, try doing it the way the course was given-- 2 hours a day for 10 days.
Michael Dorfman
Excellent suggestion!
alpha
How about IronScheme? (it's on codeplex)
Orion Edwards
IronScheme is a nice Scheme version, and the SICP references still help.
Michael Dorfman
I think I'm going to go with Scheme, there have been a lot of answers about functional languages, so it sounds like a winner, especially if the video's are as good as you say. That stuff always makes things a hell of a lot easier.
Matthew Rathbone
A: 

If you live in a Microsoft world and mess around with servers and stuff, then perhaps PowerShell might come handy one day.

Kasper
+1  A: 

It depends on what your goals are. If you want to learn a new language for 'fun' then I'd recommend something quite different, such as lisp, F#, Smalltalk, etc. That will broaden your horizons as a programmer and introduce you to new concepts such as functional programming. F# is quite fun, and it integrates well with Visual Studio: http://research.microsoft.com/fsharp/fsharp.aspx

If you want something more generally useful, I'd go for Python or Perl.

I don't think C/C++ is too heavy if you're comfortable with C#, and C++ is probably something every programmer should be familiar with if possible.

cmaughan
+3  A: 

Don't say: "which language should I learn amongst those N". Learning has to be done out of curiosity: choose one that you're curious about and you can't resist learning (then goto 'choose', repeat...)

EDIT: If you're interested in languages in general as I understand, there is a really great book, the CTM, which is multiparadigm and will give you a lot of background in programming languages and better see their orientations and choices.

Piotr Lesnicki
I agree in principle, I guess because I'm interested in a LOT of languages it's helpful to get some direction and opinion.
Matthew Rathbone
Yes, I understand ^^ The point is that all those languages are interesting and bring something different, and there are so many of them, so you should rather focus on what inspires you and just try!
Piotr Lesnicki
+7  A: 

F# seems like a good follow-up. Since you already know .NET, you can focus on learning just the language instead of the platform. F# is a lot of fun and contrasts nicely with C#: it's a ML-like language at the core, emphasizing functional programming (which will expand your mind) and type inference (which is so convenient).

The book Expert F# is excellent. My favorite chapter is Introducing Language-Oriented Programming (ch.9), which is packed with fascinating examples: probabilistic workflows, schema compilation by reflecting on types, and using F# quotations for error estimation to name just the three most striking.

Edit: Michael Dorfman makes a good point. Studying SICP will give you a solid foundation, after which it will be easier to pick other languages.

namin
Thanks for the props. I agree about F#-- it's my favorite language at the moment-- and about Syme's book.
Michael Dorfman
+2  A: 

If you want a language that will help you in your every day tasks, and allow you to tackle problems in new ways, then I suggest Perl. As someone who has used both Perl and C# professionally, there's always call to use both. I write Perl scripts (still!) to handle various programming-related tasks (deployment, quick Database interaction scripts, etc), and it has made my resulting job tasks immensely easier.

George Stocker
A: 

The choice depends on what you want to get out of it.

If you looking for more of an understanding as to the underlying concepts of the computer the I would suggest something like c or assembler (PIC-18 possibly). These arn't too complicated to get your head round and I have certainly found that they have influenced my own c# programming style as I can relate the C# to the underlying computer constructs.

To throw in a bit of a 'curve-ball' you could try something like PROLOG, a little old fashioned but still fun. I have personally found this very useful in a planning application that I had to write once. The good thing about PROLOG is the fact that it can still be integrated into C# so what you're learning isn't wasted.

TK
+1  A: 

You could try learning x86/MIPS assembly language.

TraumaPony
+8  A: 

Here are my recommendations:

  • Ruby : It's simply beautiful, a programming language that first of all teaches you about programming beauty. Quote: "A dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write." After you learn Ruby you can never look with the same eyes at a piece of code or a class or written in another programing language, it simply opens your eyes for aesthetics, simplicity, conciseness, and you'll want those everywhere. But not only this, Ruby is also a very powerful multiparadigm language.

  • Haskell : A pure functional programming language, that's my favorite from the ones I've played with, first of all because of it's purity that teaches you new ways to think about programming, side effects free, concurrency, laziness. Very valuable knowledge to bring into mainstream programming with languages such as C#.

  • Lua : a very simple yet amazingly powerful programming language. When you're done learning it you'll simply be amazed how much power can be achieved using a few simple concepts. It's mind turning to see so much power coming out of such simple things.

  • Assembly Language : When you know how to program a CPU directly you will start seeing through all other languages. There's nothing more rewarding than speeding up an expensive computation by writing and algorithm that uses SIMD instructions.Even though C is a good low level alternative, learning assembly is not for production purposes most of the time, it's for gaining knowledge about the inner workings of the computer.

Pop Catalin
A: 

JavaScript, Lisp or Boo comes to mind...

Maybe even C++...?

Thomas Hansen
A: 

PERL is a good suggestion. Another language is LUA - I started working in that a bit here and there a year or so ago - nice scripting language.

+2  A: 

Believe it or not, Javascript is actually an interesting little language in its own right. I resisted learning it for years, purely on the misguided notion that it was a "toy" language used only for "webby" stuff.

But the notion of prototype-based vs. class-based inheritance alone will give you plenty to noodle on.

JoshL
+3  A: 

Python is a nice language that provides quite readable code, a tremendous amount of documentation, a number of nice frameworks and a vibrant community in a relatively simple package.

http://diveintopython.org/ is a good starting point to learn the language.

Ken I.
A: 

ML (http://www.smlnj.org/)

For pure recreation, perhaps LOGO(http://en.wikipedia.org/wiki/Logo_(programming_language)).

I suppose it's too late for COMAL(http://en.wikipedia.org/wiki/COMAL)

SeaDrive
A: 

Maybe F# or the Semantic Web. The Semantic Web is not really a language but it changes your world view. Or learn JavaScript closures.

Theo