Which Programming Language is Best?

Click For Summary

Discussion Overview

The discussion revolves around the selection of a programming language for a physics major, specifically considering the options of FORTRAN, C++, Java, and MATLAB. Participants explore the utility and relevance of these languages in scientific contexts, particularly in relation to physics education and applications.

Discussion Character

  • Debate/contested
  • Technical explanation
  • Exploratory

Main Points Raised

  • One participant suggests that C++ appears to be the best option based on their research, noting that Java is less utilized in scientific fields and that FORTRAN is considered outdated.
  • Another participant counters that FORTRAN is not outdated, emphasizing its long-standing use in the sciences and its advantages in preventing memory leaks compared to C and C++. They highlight that many reliable algorithms are still implemented in FORTRAN.
  • A different participant recommends checking which programming language is used by the physics department to make a more informed choice.
  • One participant advocates for C++, citing its power and usage in scientific modeling, particularly in theoretical chemistry.
  • Several participants discuss options for FORTRAN compilers, with mentions of gfortran and g95 as free and multiplatform solutions.
  • Another participant mentions Simply Fortran as a user-friendly option, although they express some confusion about other compilers.
  • One participant describes Simply Fortran as a package that includes free tools and suggests that the cost is reasonable for those unfamiliar with installing software.

Areas of Agreement / Disagreement

Participants express differing opinions on the relevance and utility of FORTRAN versus C++. Some participants support the idea that FORTRAN remains valuable in scientific contexts, while others favor C++ for its broader applications. The discussion does not reach a consensus on which language is definitively the best choice.

Contextual Notes

Participants' views are influenced by personal experiences and anecdotal evidence, and there is a lack of consensus on the most suitable programming language for physics applications. The discussion also reflects varying levels of familiarity with the programming languages and compilers mentioned.

danielu13
Messages
67
Reaction score
0
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.

Thanks!
 
Technology news on Phys.org
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.
 
I would recommend finding out what computers and what language the physics department uses, since that is your major.
 
What is the best fortran compiler for Windows 64-bit? Also OS X? Preferably something free or reasonably priced.
 
Last edited:
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:
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?
 
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.
 

Similar threads

Replies
86
Views
3K
  • · Replies 397 ·
14
Replies
397
Views
22K
Replies
16
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
18
Views
3K