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

Which Programming Language is Best?

  1. Jul 29, 2012 #1
    Hey guys,

    Starting in a couple weeks, I will begin my college education at North Carolina State as a Physics major. One requirement for my degree is a programming class. For my degree, the offer FORTRAN, C++, Java, and MATLAB. My counselor has not advised me to take a single one, just to choose. I'm trying to figure out which one would be the most useful and the best for the future. From my research so far, C++ seems to be the best, as it seems that Java is not used much for science and FORTRAN is rather outdated. But I could be wrong. Any help would be appreciated.

  2. jcsd
  3. Jul 29, 2012 #2
    No, Fortran is not outdate at all. May be old, but that does not mean is outdated. Also, there is a reason why is "old" or better put, there is a reason why it is still around! Fortran came out of the sciences and has always been used in the sciences. The most used and bug free algorithms that you will one day need, have been around in Fortran.

    Fortran protects you against memory leaks better than C or C++. Fortran now has structures and pointers if that is what you like. Fortran handles arrays a-la-matlab, if that is what you like; it can also vectorize array operations. Matlab's behind-the-scene linear algebra package is written in Fortran 90.

    just a couple of cents.
  4. Jul 29, 2012 #3


    User Avatar
    Homework Helper

    I would recommend finding out what computers and what language the physics department uses, since that is your major.
  5. Jul 29, 2012 #4
    What is the best fortran compiler for Windows 64-bit? Also OS X? Preferably something free or reasonably priced.
    Last edited: Jul 29, 2012
  6. Jul 29, 2012 #5
    I think C++ is the best choice. I am not in the field of physics so I cannot say for sure that it is the most often used for that, but I know someone who works for a theoretical chemist and does C++ programming for their computational models, so C++ is definitely used for some scientific modeling.

    C++ is a powerful language, and is also widely used.
    Last edited: Jul 29, 2012
  7. Jul 29, 2012 #6


    User Avatar

    Staff: Mentor

  8. Jul 30, 2012 #7
  9. Jul 30, 2012 #8
    I've looked at both of those, but they seem somewhat confusing so far. I found Simply Fortran, which apparently is cheap and keeps some functionality after the trial has expired either way. Has anyone worked with that?
  10. Jul 30, 2012 #9
    I had never heard of Simply Fortran, it seems fair; basically, they are packaging free tools: gfortran (and probably the rest of the GNU tool chain for C), Scintilla editor, GDB debugger...the only thing that seems they wrote is the IDE itself.

    If you were confused with the webpages for gfortran and g95, $25 is a very reasonable amount of money to pay to save you a couple of hours of your time if you do not have experience searching and installing software, etc.

    Go for it, it will save you a lot of trouble.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook