Re: Which computer language program is best for undergrads?



gk712@xxxxxxxxx wrote:
I will be starting at a 4-yr institution for a math degree.

The school material states that the student should be learning a high-
level computer language such as Fortran, C, or C++.

There are dozens of languages, expanding the pool also to languages such as R, Mathematica, Maple, Matlab, Java, python, perl, etc.

I personally have not seen to many guides on programming languages for mathematical purposes, but I can summarize my opinions.

In short:
Fortran - oldest major language; it was designed for engineers originally, so it will look more foreign to programmers. Despite its age, it is one of the most heavily-used languages on supercomputers.

C/C++ - the core of these are the same. I believe statistics give the two about equal amounts, although that is dubious since C can be easily called from C++. Many libraries are C, though, so C would probably be preferred over C++ simply from a neophyte's perspective.

R, Mathematica, Maple, Matlab: All of these are specifically designed for mathematics. The latter three all require specific mathematics packages (although Octave as an open source near-implementation of matlab). I've used each of these a tad, but I'm willing to bet that these are not what the school intends for learning.

Java - One of the most popular languages; typically used in introductory programming courses. For that reason, the largest body of material can generally be found in Java, although its default library setup isn't terribly mathematics-welcoming.

C# - Similar to Java, although it is a Microsoft derivative. I haven't played around here much, but I think it's more welcoming to mathematics work, although not from a cross-platform point of view.

Python, ruby, perl, etc. - these are your newer languages, which tend to have more cult-ish proponents. I would stay away from these, as they are your scripting languages, and less concern themselves with mathematics work.

My recommendation is to pick up Fortran, C, or C++, with no real preference between them. All of these have vibrant communities and are so widely used that the largest mathematics packages (e.g., lapack) will be accessible from them. And don't worry about them dying away; they've been here and heavily used for several decades, and still will be used through your working career.

I might post this question in a programming group as well.

This is not a good question for comp.lang.*, since it tends to invite flame wars. The (good) advice you will get will most likely amount to the following: "Pick a language that suits you well and stick to it."
.



Relevant Pages

  • Re: Using Object Oriented Programming to revolutionize physics?
    ... perspective to see the sophisticated capabilities of the type of ... mathematics we use with Java and similar languages. ...
    (comp.lang.java.programmer)
  • PLMMS 2009: First Call for Paper
    ... The ACM SIGSAM 2009 International Workshop on Programming Languages ... for Mechanized Mathematics Systems will be co-located with TPHOLs 2009. ... Final Papers Due: July 10, ...
    (comp.lang.lisp)
  • PLMMS 2009: First Call for Paper
    ... The ACM SIGSAM 2009 International Workshop on Programming Languages ... for Mechanized Mathematics Systems will be co-located with TPHOLs 2009. ... Final Papers Due: July 10, ...
    (sci.math.symbolic)
  • Re: i am new to java
    ... >>> It is certainly easier than Fortran, COBOL, C, APL, any Assembler, ... I think Fortran is too but I'm not sure. ... > Have you learned any other programming languages that you think are ... Java isn't a particularly difficult language. ...
    (comp.lang.java.help)
  • Re: The Fundamental Confusion of Xah
    ...  Does that mean we've migrated to C or Fortran? ... Lisp based products communicating with other important languages. ... What proportion of your code base is written in Java? ...
    (comp.lang.lisp)