views:

2375

answers:

25

In your opinion, what are the most important languages for a programmer to know? I'm talking about concepts, not about how practical the language is.

List the languages and a reason. For example, Lisp for functional programming, JavaScript for prototype-based OOP, etc.

+2  A: 

For concepts, I would choose assembler and Java.

The first because you should know in intimate detail how machines work.

The second because you should understand how to shield yourself from the intimate details of the way machines work :-). By that I mean a language with a rich set of data structures at hand (so really Java could be Python, C++ with Boost and so on).

paxdiablo
A: 

You already mentioned two, here are a few more:

  • Java: Java is a good example of OOP 'cause you HAVE to use oop, and it's designed from the ground up to be an OOP language.
  • BASIC: Although obsolete, it's a good example of procedural languages and it has a very easy syntax.
Leo Jweda
C'mon guys, leave a comment if you downvote. How are people meant to learn or adjust their answers?
paxdiablo
Actually Eiffel would be the better language to pick up OOP, imho.
Joey
I haven't tried Eiffel but I know that Java is really helpful, I saw a lot of the OOP concepts in action just by writing a hello world program.
Leo Jweda
I assume you mean Structured BASIC. I wouldn't call the BASIC I learned "procedural."
Nosredna
+10  A: 

C for understanding how the most other language(-implementations) and operation systems are implemented

Peter Miehle
Some have big trouble understanding why it is not good to return reference to private variable in Java class, it's hard to grasp the concept without understanding C, memory management, stack, heap, pointers, references (address) and so on
stefanB
A: 

Pseudocode for reading/writing documentation. :p

I think knowing C/C++ or any other low level language will help you with understanding the impacts of how managed/script languages works helps. Such as pointers will demystify variable references.

Mike737
But references are not pointers (they don't even need to be addresses) :-)
Joey
A: 

For web programming: PHP, ANSI-SQL, javascript.

Some people may argue that HTML and CSS are not programming languages. But they are esential for web app development.


For Desktop app development, C++ with the Qt Framework. Qt gives C++ the additional "cross-platform" fizz.

Here Be Wolves
Please reread my question; I'm asking about *concepts*, not about practical languages.
musicfreak
HTML and CSS are not programming languages, and there is no "arguing" about it. If it's not turing complete, it's not a programming language.
n3rd
Hmm, point taken. And you've justified your nick too!
Here Be Wolves
A: 

Pascal or Basic for start and to master basics of procedural programming.

At school we learned Haskel for functional programming.

And then one should try assembler or C for getting deep and Java for OOP.

A have no arguments for this - that's only my taste and what I tried.

Martin Lazar
Hello, it's 2009 o'clock, why learn pascal or basic when we've got python!?
alamar
"2009 o'clock" - ha ha. Good one *snort*.
paxdiablo
My copy of Code Complete has code samples in BASIC and Pascal, yet the concepts it conveys are far from outdated :-)
Joey
once again for those with 2009 o'clock ;) - I have no arguments for this - that's only what I tried :)
Martin Lazar
@Johannes: My copy of Elements of Programming Style has its code samples in FORTRAN 66 and PL/I, but its concepts are far from outdated either.
David Thornley
A: 

You should start from C and go through C++, Java and the goto WinForms, Then better goto .NET

Sauron
What if he's a mac guy? What if he wants web development?
alamar
He should specify what he need.
Sauron
Either way, programming concepts should transcend specific operating systems and development environments.
htw
I looked up WinForms. It has something to do with Real Estate. You have me baffled.
Nosredna
+1  A: 

Well. I'd say learn C and javascript. They are most widely used languages.

You might want to learn Java/some .Net language and/or python/ruby: they're more convenient, tho.

This have the advantage that all those languages are reasonably well designed. For example, don't learn PHP or C++ because they're a mess. They're used widely, you might want to learn them one day, but they can seriously mess with your mind.

alamar
A: 

I would sat C/C++ cause it sets allot of basics for allot of other languages used around the world.

Personally I learned Java/JavaScript->VB(short course fortunately)->C#->C++, with a pinch of PHP and Perl on top of it all. Best part of that line was C# and then moving behind the scene in C++.

cyberzed
+23  A: 

Must know:

1) C (system programming, understanding of machine architecture)

2) Perl or Python or Ruby (practical day-to-day tasks)

3) Java or C# or C++ (OOP, and quite important to get a job these days)

Really important:

1) Haskell or ML (functional programming; changes the way you think)

2) Lisp or Scheme (power of macros)

Nice additionals:

1) Forth (very low-level, explicit stack operation + joy to write your own interpreter)

2) Assembly languages (know how your CPU works)

3) Erlang (parallel processing)

4) Prolog (logic programming)

5) Smalltalk (true OOP and true interactive developent)

Igor Krivokon
COBOL, so you never repeat the same mistakes :-)
paxdiablo
@Pax - What's worse, COBOL or APL?
Chris Lutz
Well, COBOL is at least readable (and we still use it on the mainframes). Is anyone still using APL?
paxdiablo
The last I heard of APL being used was in investment banks.
Nosredna
Forth, just as good for macros as Lisp or Scheme.
kotlinski
I am learning APL right now. The airline industry uses it and I get to convert it to C#.
Trevor Abell
C - not only system programming but to understand how memory is handled (pointers, heap, stack, method frame on stack and so on), this is important to understand other high level languages that don't have pointers and allocate objects on heap (Java?), as well as those that have pointers and return objects (Objective-C)
stefanB
+3  A: 

I would say:

  • C or Assembler to understand how the processor work.
  • Smalltalk (or C#, Java, Python, Ruby, etc) to understand object oriented programming.
  • Lisp (any Lisp, Scheme, Common Lisp, Clojure) to understand high level programming, meta programming (macros), etc.
  • Haskell to understand type inference and other functional concepts.

If you are into distributed systems, I'll consider learning Erlang too. Those are the language I recommend learning, even if only superficial, only for the sake of learning even if you never use them to write a real application.

J. Pablo Fernández
+17  A: 
  • The assembly languages of as many chips as you can learn for low-level knowledge.
  • C to learn more practical knowledge of low-level workings, since almost all languages are implemented in C.
  • C++ for object-oriented programming on top of the low-level goodness of C.
  • Pascal to learn how to work with strong typing.
  • Java to see how you can shield yourself from low-level concerns.
  • Perl to learn regular expressions, weak/dynamic typing, and other good things.
  • Python to see strong/dynamic/duck typing.
  • Ruby to see how object-orientedness works on top of Perl-esque weak/dynamic typing.
  • Common Lisp for that functional enlightenment.
  • Scheme for the emphasis on recursion.
  • Emacs Lisp so you can extend Emacs.
  • Haskell to see pure functional programming done right.
  • APL so you learn how not to write code.
  • COBOL so you can make mad money maintaining legacy code.
  • Erlang to really learn about concurrency. (Thanks to Pete Kirkham for correcting me.)
  • Scala for functional programming on the JVM.
  • Clojure for a Lisp-like functional language on the JVM.
  • Prolog to understand logic programming.
  • D so you can see why all the D fanatics are always so pro-D.
  • C# so you can program for .NET (and Mono).
  • F# so you can do functional programming on .NET.
  • Forth for stack-based languages.
  • PHP so you can see how not to create a language. (Just kidding. Learn PHP beacause it's really useful for web development.)
  • JavaScript because it's basically the language for client-side web scripting.
  • bash for a good, general-purpose scripting language.
  • Visual Basic so you can read the code your boss wrote. =)
  • INTERCAL for "fun."
  • brainfuck so you can torture your friends.
  • LOLCODE so you can convince them to still be your friends after you subject them to brainfuck.

...And so on.

Chris Lutz
Erlang is about concurrency - for the first 20 years it didn't support SMP ( threads and parallelism ) at all!
Pete Kirkham
Forgive me. I'm not familiar with the differences between different concurrency paradigms.
Chris Lutz
Realtime language counts? like Ada ?
zeroin23
http://processing.org/ "Processing is an open source programming language and environment for people who want to program images, animation, and interactions."
zeroin23
ActionScript? for working in a animation timeline environment.
zeroin23
Visual Basic also helps in learning VBA.
zeroin23
I can't list everything - this list would get huge, and I'd spend the rest of my life maintaining it. That said, Ada probably deserves a mention. I don't know about ActionScript, and I'm not a huge fan of Processing (although I've already mentioned C#, VB.NET, and Python).
Chris Lutz
I'm surprised Smalltalk hasn't been mentioned. It deserves more mention than, say, Emacs Lisp and PHP. :)
musicfreak
@musicfreak - I agree, but I don't know enough about the language to give it a one-liner description of why it deserves mention. I did try, but I couldn't find a concise way to point out its differences from other major OO languages. (This is probably just because I'm not too big on OO myself.)
Chris Lutz
+1 for LOLCODE.
Rob Allen
"Emacs Lisp so you can extend Emacs.", so you assume that extending Emacs is 'a concept'? I would say that it is a very specific task. I would understand if concept was to extend editor (?) - but would you need a specific language for that?
stefanB
@stefanB - I just started listing everything I could think of. I'll edit again if I can come up with enough good languages and good reasons to add. Currently only have Smalltalk, Ada and maybe ActionScript.
Chris Lutz
+2  A: 

Its best to know a variety. This gives you a better overall perspective of the art of programming, plus, you get to choose the best tool for the job.

My current list would be:-

  • C - programming close to the machine.
  • Python - programmers nirvana.
  • Perl - for when s**t happens.
  • Java - cause it will keep you in work.
  • C# - cause it will keep you in work.
  • lisp, scheme or something functional to get your brain out of a rut.
  • SQL - for managing large data sets.
  • JCL, COBOL, VAX DCL, CShell VB - just to remind you how bad things could be!
James Anderson
+3  A: 

It is not the languages rather the paradigms you should know:

  • procedural (like C, Pascal)
  • object-oriented (like Java, C++, Smalltalk)
  • functional (like Lisp, ML, Scala)

If you understood one of these paradigms in one language, it is easy to learn another language in the same paradigm. And there are even more fields specially supported by languages that are important to understand:

  • parallelism (in Erlang or Scala)
  • declarative templates (e.g. in C++ or Prolog)
  • dynamic languages (e.g. JavaScript)

At at last you should always know what goes on under the hoods, so you better have a look at assembler.

ftl
A: 

Look for a set of different programming languages:

  • C++ / C# / Java etc.
  • C / Assembler
  • Python, Ruby, Lua, Perl etc.
  • sh, awk, sed, regular expressions
  • Prolog (or similar)
  • Haskell / Lisp etc.

It doesn't really matter which ones you choose, but that you choose one from each "category".

Daren Thomas
A: 

You should know a scripting language so that you can prototype your applications faster.

Maybe python/ruby/perl . Groovy is also an alternative if you're a Java guy that likes his java libs.

Geo
A: 

If you want to understand computers and the underlying hardware, C is the single most important language, commonly said to be the lingua franca of computers. The Stackoverflow podcast tends to cover this at least once a week.

There seem to be enough answers on this, so I'll just leave it at that.

JesperE
A: 

Alot is already mentioned but I would definitely add C++ (already done) for the following reason:

C++ for learning how to use pointers and get the main idea about them.

Although there is the discussion if c++ is still the 'better' language (all depends on what you want to make really) it never hurts to understand pointers, just in case you do need them ever.

bastijn
Surely Pascal/Delphi have a better way to teach it. Is not only more clear implementation, you don't need to have that syntax garbage of C/C++ all around obstructing enlighment ;)
mamcx
A: 

Having a scan through the answers so far I'm surprised I've not seen any mention of actionscript.

I think if you learn some C/C++, then some Java then that should prepare you for pretty much all of the decent languages out there. I prefer to see my code in action and I find Actionscript 3 (not 2 or 1) along with Flex (which is MXML) great for quickly demoing visual concepts.

So C & Java helps to learn the syntax of the majority of languages. Actionscript 3 (very similar to java syntax) & MXML for being able to express you code visually very quickly.

Someone else
+1  A: 

Limbo - a programming language with concurrency and channels, what C should have evolved into. ( see also D, another C successor )

No-one else seems to be mentioning any declarative languages, so here are a few:

Prolog - a declarative language for logic programming

Modelica - a declarative OO language for modelling systems.

XSLT - a declarative language for transforming XML.

For parallelism, you don't get much wider than shader language, and the related OpenCL - typically 512 processors in parallel on a high-end desktop, rather than Erlang's 4 processors in parallel ( though with many scheduled processes ).

Pete Kirkham
+4  A: 

I think the three languages that best combine practicality and coverage of programming concepts would be

  • C
  • Python
  • Javascript

From these languages you can learn low-level system programming, pointers and memory management, static typing, dynamic typing, high-level scripting, event-driven programming, OO programming, functional programming.

Obviously you're not going to get as pure an intro to functional programming as you would with, say, Haskell, but you can learn a lot of the concepts in Python and (especially) Javascript.

James Tauber
A: 

A good short list:

  1. C for the machine concepts
  2. Haskell for functional programming
  3. Smalltalk (or maybe Ruby or Simula-67) for object-oriented programming
  4. Prolog for logic programming
  5. Icon for backtracking and mind-blowing string processing
  6. Bourne shell for Unix scripting

Might also include

  1. Scheme for macros
  2. Awk or Perl or ... for regular expressions
  3. FORTH for tiny bootstrapping postfix wonderfulness :-)
Norman Ramsey
+1  A: 
OhioDude
A: 

C - low level system programming plus to understand generic concepts about how memory is handled, stack, stack frame, heap and so on. These are helpful for understanding higher level languages

C++ - mainly std library (separation of generic algorithms and containers), templates, namespaces, but OO concepts as well. Templates meta programming will give you completely different perspective on writing software, this is compile time execution versus run time execution. Templates inheritance (static vs dynamic polymorphism).

Python - dynamic type system, list comprehension - functional programming (?), no memory management for developer, spaces for indentation

Objective-C - message dispatching (can dispatch to nil), dynamic type system (static as well), late binding, OO concepts

stefanB
A: 

It may sound crazy, but I first learned to program writing VBScript macros for windows. I used a template, which is available here http://vbscript-macro-template.blogspot.com/ and I just added to it and also tried to understand everything that it did. Now, several years later I am writing my own desktop and database applications.