views:

1613

answers:

16

I come from a web developer background, so I'm fairly familiar with PHP and JavaScript, but I'd eventually like to branch out into other languages. At this point, I don't have a particular direction or platform that I'm leaning toward as far as learning a new language or what I would use it for, but I would like to learn a little bit more about programming languages in general and what each one is used for. I've often heard (and I agree) that you should use the right tool for the job, so what jobs are each programming language best suited for?

Edit: If you've worked with some of the newer or more obscure languages, please share for those as well.

+2  A: 

Depends what you want to achieve. You have high-level, general purpose languages like Java, C#, ... which are probably the best choice for business application development.

On the other hand you have languages that are closer to the metal like C, ... which are beter suited for driver development etc.

You have scripting languages which provide many useful functions to get some things quickly done like perl, bash, .... these are especially usefull for text parsing, manipulation and such.

It's a very broad concept and difficult to wwrite down. Everything depends on what you want to achieve and once you know that, you should pick the best choice.

nkr1pt
+1  A: 

Start with the highest level language that you like using it and works on the platform you're deploying to, then progressive get lower level when/if performance becomes an issue (which it probably won't).

jonnii
+8  A: 

Assembly - very, very low level, coding directly to hardware

C - writing low level, performance-critical code

C++ - develop very high performance games and applications. Object-oriented, so more scalable than C

C# + .NET - develop native Windows desktop and server applications, Silverlight RIAs, XNA games

Java - develop cross-platform desktop, server and mobile applications

JavaFX Script (beta) - develop good-looking Java content

Objective-C + Cocoa - develop native Mac and iPhone applications

ActionScript - Develop Flash websites, games and applications

MXML/Flex - Develop Flash-based RIAs

Lingo + Director - develop multimedia products such as CD-Roms, and 3D Shockwave games

C# + Unity3D - develop amazing 3D games that run in the browser

Ruby + Rails - rapidly develop web applications

Python, Perl - very flexible scripting languages with thousands of applications

Visual Basic for Applications (VBA) add new functionality to Microsoft Office

Small-talk - pioneering object-oriented language for developing applications

Iain
+31  A: 
  • Lisp: learning programming, playing programming games
  • Perl: Concise string manipulation, job security
  • C#: earning a living without selling your soul (too much)
  • ruby: having fun while programming
  • PHP: finding a web host to run it on
  • javascript: client-side web programming
  • x86 assembly: speed, understanding the metal
  • BrainFuck: showing off
Colin Pickard
Up votes for the humour, but this only make sense if you already know about all those languages.
Iain
I find Perl fun to program.
Brad Gilbert
upvoted for awesomeness
Mike Leffard
about C# - +100
chester89
+3  A: 

In my opinion, Python is best suited for:

  • Scripting
  • System administration
  • Text processing
  • Web applications (server side)
  • Rapid development, prototyping
  • "Gluing" other applications

C is best suited for:

  • Whatever needs to be fast: number crunching and so on
  • Whatever needs to access low-level resources: drivers, kernels and so on. In an answer to one of my questions, C has been described as "the most portable assembly"
Federico Ramponi
Oh, and COBOL is best suited for maintaining other COBOL code :D
Federico Ramponi
... and that is the only thing it is good for.
Brad Gilbert
+2  A: 

Tcl excels as an embedded scripting language. Many commercial products embed Tcl (think cisco, tivo, oracle, integration engines for the healthcare industry, CAD tools, and the list goes on). While it is great for these powerhouse applications it is small and simple enough to use for every day applications where you want to expose a scripting language. The language is remarkably easy to learn.

Tcl is also a first-rate scripting language in its own right, equal in power and portability to Python, Perl, Ruby and others, if not better in some regards. It is particularly good combined with the Tk extension for creating cross platform GUIs.

Bryan Oakley
+1  A: 

VBA - for working with MS Office applications

Lance Roberts
eeew - as if there was an alternative!
Steven A. Lowe
+22  A: 
  • Assembly is useful to learn so that you know exactly what is going on at the bare metal - sometimes useful to understand performance issues. In the majority of cases, it makes more sense to just write the code in C (which is usually both more readable and more maintainable), but you may encounter a few scenarios where you have to use assembly. Some C programs have bits which are bottlenecks written in assembly for performance.
  • C is useful for low-level operating system and embedded development, as it is efficient, and some of its language features are ideally suited for dealing with low-level hardware.
  • C++ is useful for performance-critical large-scale applications. It has features that help in the structuring of large applications, such as object orientation, but retains the low-level features of C. A lot of video games are written in C++, for example. However, it is a complicated language to learn, because it includes many different features.
  • Java is useful for cross-platform development, for tasks that are not as performance-critical as C++; examples would be GUI applications and dynamic web sites. C# has many similar characteristics to Java, although developing cross-platform applications is not as easy.
  • Python, Ruby and Perl are useful as general-purpose scripting languages, although the former two have also become popular recently for web development.
  • Lisp and dialects such as Scheme are worth learning because they make you structure your programs in a more elegant way. Lisp is not generally used widely in many real-world scenarios, but it will make you a better programmer if you learn it.
  • Haskell is useful to impress your friends.
Simon Howard
I couldn't have said it better myself. It's also worth noting that there are a number of analogous languages within the categories you listed (e.g. Java and Scala). +1
Daniel Spiewak
Don't really see how Java is useful for making dynamic websites. Do you mean on the server side?
Iain
Server-side is correct. It's getting a lot better on the client side too with 6uN (or u10 or whatever they called it).
Daniel Spiewak
AutoCad is written in lisp :-D
Brian Gianforcaro
A: 

Malbolge for destroying your brain.

Claudiu
A: 

Assembly/Machine Code: Essential if you're writing a compiler targetting the bare metal, or a JIT emulator/virtual machine/interpreter.

Daniel Cassidy
+1  A: 

Unix Shell Scripting for writing small command-line tools.

too much php
A: 

I come from the same background (PHP/MySQL) and have been learning Python for game development in my spare time (using pygame). It has been great fun and python will be handy for other projects in the future.

too much php
+2  A: 

LOLCODE just because it's there

seanb
And just beacuse you'll laugh your ass off when reading it afterwards... ktnxbye
Sakkle
A: 

Haskell - to write comments on stackoverflow about writing comments about haskell about writing writing comments on stackoverflow about ...

Steve B.
A: 

VB.Net - Writing code that looks like pseudocode.

Kibbee
A: 

Remember, that PHP can also be used as a general purpose programming language. It's great for text processing, administration etc.

itako