Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What languages would you suggest a programmer to learn, not because they will have a lot of use of the language (but they may have), but because it will improve one's programming skill in general and let one think in a different (and possibly better) way?

share|improve this question

closed as not constructive by Anna Lear Dec 26 '11 at 2:20

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

12  
Not a single one. Rather: As many of them as possible, each as different as possible from the others. –  delnan Jan 16 '11 at 22:03

17 Answers 17

up vote 25 down vote accepted

for "normal" programming and algorithms:

  • python, good to learn, easy to use, pretty to read.
  • C++, teaches you what a computer REALLY is.

for a thought changing experience:

  • Haskell
  • Prolog

for destroying your mind and crossing the line between padawan and Jedi Master:

  • Common LISP
share|improve this answer
3  
yes, agreeing with chrisaycock, C and assembly will teach you what a computer REALLY is, C++ is a very very slight step upwards, but will still have you handling issues like memory pointers and high-performance issues –  Lacrymology Jan 16 '11 at 21:27
3  
Prolog is the best-known language of the logic paradigm. It is important to bend your mind around all paradigms you can handle, if what you want is to get better as a programmer, it'll help you get mental agility plus it'll give you new tools. I guess any Lisp dialect would do, what I see in Common Lisp is that it looks like the most production-usable Lisp to me. –  Lacrymology Jan 16 '11 at 22:20
1  
I'd vote for Scheme over Common Lisp - I guess it depends if you think you'll ever actually use a Lisp in production. If not, go for Scheme. –  Skilldrick Jan 17 '11 at 11:20

A well-rounded programmer has several bags o' tricks up his/her sleeve, and these include:

  • Assembly, for learning how the guts of a computer works.
  • A procedural language such as C or Pascal.
  • A functional language such as Scheme.
  • An OOP language such as Squeak.

These all teach you slightly different ways to think about and approach problems.

share|improve this answer

Java is one of the languages taught most at universities worldwide and there's a reason for it. Though it's often Dinosaur-like, it gives everyone a very good overview of the Concepts of modern programming. It does NOT show you how the computer itself works like Assembler or even the already-much-much-more abstract language C. But Pilots have to be able to fly and not to be able to Build an Airplane on their own - go learn JAVA as a good Basis for any Code you'll write in the (for a reson) most common languages nowadays: Java, c++, php, c#, ruby(on rails) python and so on...

max

share|improve this answer

There are a number of programming languages that will require that you think about a problem in a new way (relative to what you are used to of course.) The most common languages to learn having been taught a imperative language, is a functional and a logical language, for instance prolog and lisp.

Some languages are heavily influenced by category theory, like ocaml and Haskell and some are cross breed languages like Curry (functional and logical). Curry is probably the most mind blowing language that I know of, not just because it got all the mind blowingness of Haskell with logical programming, but also because of the integration with constraint based programming.

Another fun language is Occam-pi since it is so heavy on concurrency, but also because of the recent arduino port.

share|improve this answer

I would suggest Scala if one is come from C/Java world.

It is not purely functional programming language, but it use OO to simulate some functional programming features (ex. Using object to simulate first class function and high order function).

So if you are familiar with OO, Scala uses terms you already knows to explain the functional world.

I found it is easier for me to understand functional programming in Scala rather than dive into a more functional programming like Haskell, List...etc.

share|improve this answer

Hands down, I would say Haskell. And for two reasons:

  • It's simply the best way to learn functional programming. Just about every other language allows side effects by default, but can do things functionally (and yes, this includes the MLs and Erlang: see this talk for more info). Haskell is functional by default, but can be made to use side effects when you need them.
  • It's definitely a language that encourages you to think before you code. To be honest, this has never really been a problem for me (if anything, it's the exact opposite). That said it seems like I'm a minority. Most of the programmers I've run into seem to be more of the "code first, ask questions later" mindset rather than the "ponder your problem for days before coding the solution in 5 minutes" mindset (which tends to be my mindset). Therefore, this kind of language can provide valuable experience to most programmers.
share|improve this answer

I would recommend Ruby. Ruby doesn't demand that you change paradigms, but it encourages you to work in multiple paradigms. I think that advantage of this is that instead of being frustrated with not being able to work they way you are used to, you use a different paradigm out of frustration with the limitations of doing things the way you are used to.

share|improve this answer

I would suggest Scheme.

It's a functional programming language derived (most actually think it's a dialect) from Lisp. The main difference with Common Lisp is, its approach is very minimalistic - extremely so. For instance, in a normal distribution of Scheme (any scheme < R5, or Mit/GNU/Scheme) you won't find a loop implementation: you'll have to make your own using tail recursion.

It's really expressive and its syntax is great to learn something new about programming, as in: just looking at the code, you get an idea of how the compiler/interpreter will work its way trough it.

Plus, it comes with the Best Programming Book Ever, Structure and Interpretation of Computer Programs, freely downloadable on the MIT's website.

Here are some video lesson that, I hope, will immediately get you interested in this fascinating language - the speakers are the authors of SICP: http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/

share|improve this answer
1  
Scheme was minimalistic, but in R5 it had grown some warts, and on R6 it's decidedly huge. It's a pity, since it was very beautiful. For a really minimalistic but still practical language, check Lua –  Javier Jan 17 '11 at 3:23

Some great suggestions here. I'd probably go with C or C++ personally. They force you to deal with a lot of concepts that matter greatly in understanding how things work, but that tend to get obfuscated in other languages. Just understanding how things are really working is going to help you as a programmer even if the language you're using later hides some of the details.

Assembly is fun if you want to dig in even a bit lower level then that, but don't expect to get a lot done with it. :)

share|improve this answer

There's a very simple program for writing Java Applets called Processing

This language will give you a very basic understanding of variables, loops, and that sort of thing, if you're just starting out.

share|improve this answer

Ruby has one of the most powerful and intuitive testing frameworks I've used. I'm not sure I really understood how to properly use mocking and stubbing until I started writing tests in ruby. rSpec and Cucumber are fantastic tools.

share|improve this answer

you won't learn correctly any programming language without a clear target. Knowing what you want to do with it,then you can decide which program suit your needing.

For example, let's say about c#.

C# can do web program, console program, stand alone executable, gaming program, silverlight program and mobile program. While the syntax is equal in almost every case but it works differently in every scenario. For example, a stand alone executable keeps their information until it is unloaded or the program is finished, while a web program, the information is destroyed every time you load a page, and in silverlight, you will spend most of the time, struggling with a xml file.

And second, don't spend your time with exotic languages (Haskel for example), corporate speaking, there are very few program worth your effort :java (king of the hill), c#/vb.net, php and sql.

share|improve this answer

The functional languages are the ones that I feel helped bring me to where I am today. Even though I'm in web application development, the concepts learned from functional languages help me see solutions to problems that I otherwise wouldn't have seen. Here are the languages I worked with in my university:

  • C++ (Not functional, but concepts like pointers and memory management are invaluable)
  • Dr. Scheme
  • ML/Ocaml (We wrote another language using ML/Ocaml!)
  • JavaScript (Functional language that is gaining traction in industry, both client side and server side)

Learning these languages will help you understand the world of abstractions, and how to build blocks of code that encapsulate other functionality, hiding the low level details so you can focus on the high-level business goals.

share|improve this answer

Don't forget Javascript.

It has OO features that are not your usual OO features. It is well-suited for higher-order functions and closures, and you routinely use these. It allows for many functional programming tricks. It is enormously flexible.

And it's practical, because every serious browser has it.

(Of course it has a number of unpleasant quirks, too. Few practical languages don't)

share|improve this answer
1  
Does JS have OO features that Java doesn't? –  Mahmoud Hossam Feb 7 '11 at 11:13
3  
@Phobia: JS does OO in a totally different way. There is no classes. Inheritance is done via prototypes — essentially an object can inherit from any other object. Functions are first-class values; you not only can pass them around, you can easily assign new methods to existing objects. The way JS does data hiding is also quite different from Java: everything an object exposes is public, so you hide data and methods using closures. Note that there's no 'canonical OO'; JS is a bit closer to 'original' OO that Smalltalk invented than e.g. C++, but Java's OO is now also 'canonical'. –  9000 Feb 7 '11 at 11:56

LISP, preferably Scheme in combination with Abelson & Sussman's "Structure and Interpretation of Computer Programs", will teach you to think in terms other than those imposed by C/C++.

FORTH, specifically a block-oriented FORTH, not a file-oriented one (such as D85) will teach you to curb your loquaciousness. When you cannot under any circumstances whatsoever write a routine longer than 16 lines of 64 characters, you are forced to abstract and factor.

share|improve this answer

C# 3 with LINQ.

It's a great intro to functional programming.

Try writing a program (or solving Project Euler) and replacing as many loops as possible with LINQ calls.
It helps one master the concepts of functional programming and lazy evaluation.

From there, one can move on to F#

share|improve this answer

C and assembly for how a computer works

Haskell and LISP for both functional programming and metaprogramming

APL for vector and terse programming

bash or tcsh for how to administer a computer programmatically

share|improve this answer
4  
Instead of APL you can use J by the same author. –  9000 Jan 16 '11 at 21:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.