Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Which One?

  1. Jun 1, 2008 #1
    Hi all. This question has probably been asked before but I couldn't find it so. Over the past year I have dabbled with a few programming languages such as C,C++ and perl. My question is, which one should I really focus on and why?
    Thanks for any help.
  2. jcsd
  3. Jun 1, 2008 #2
    My personal opinion is that if one is interested in becoming a competent programmer for the purposes of, say, scientific computing or mathematical finance, then one should learn three languages well. Learn a good, well-documented, and fast compiled language. Learn a good, well-documented, and fast interpreted language. And learn a good, well-documented, and full-featured interpreted language. My own preference would be:

    • Compiled language: C++. There's an argument to be made that a knowledge of C or F90 is useful for really low level stuff, but I've rarely found it necessary to use any other compiled language than C++. It's stable, fast, and there are some great compilers available for it. What's more, it's portable as can be if you're not silly about your code.
    • Fast interpreted language: Python. For far too many reasons to go into here, it really is a great language to know.
    • Full-featured interpreted language: Matlab. Yes, it's expensive as hell unless you get a student copy. Yes, the JVM makes the Matlab desktop slower than it needs to be. And yes, it's proprietary software. But none of that matters. It's the industry standard in areas like mathematical finance, it's got simply wonderful graphics-handling capabilities, and it comes with some seriously powerful toolboxes. The great thing is that you can call these features from C/C++ to combine speed and sophistication.
  4. Jun 1, 2008 #3
    I might look into Ruby as your fast, high high level language. In Ruby, everything is an object, even literals, so you can strengthen your OO principles. I've found this helps reinforce my knowledge of the OO paradigm, and thus making me more proficient in C++. Ruby seems to be the up and coming thing. Plus, in Ruby is similar to perl.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook