Will FORTRAN always be the premier programming language for science?

In summary: Fortran 2006. Granted, that was a few years ago, but I don't remember any other languages being available...In summary, I think that Fortran will probably still be around for a while, but I think that C or a higher-level language may eventually take its place.
  • #1
Aaronvan
44
2
Fortran has been around since the 1950s and obviously there is a large amount of Fortran code lying around. However, I'm curious if C or another programming language will someday supplant Fortran. Perhaps scientists will gravitate towards high-level math packages like Matlab and Maple, and programming skills will become less important. Any ideas or opinions out there?
 
Technology news on Phys.org
  • #2
Hey Aaronvan.

You posed a very interesting question and I'll give my take on it from a dev perspective.

There are two main things IMO in software that are a driving force in technology and dev work and they are automation and integration.

You automate more stuff that you can automate and you create a platform to integrate different technologies that do a specific job really well so that as an integrated set, they do one complex thing very very well.

The integration thing is what I want to focus on because it relates to complexity of the task involved.

It becomes necessary that as requirements go through the roof with regards to complexity, you get a situation where you need lots of different programs that do something well to communicate.

With libraries you can do this at some level as well as with scripting languages and SDK runtimes (like DLL libraries) and what i see happening is scientists being forced in the future to either get platforms that make this easy, or to get someone (possibly themselves) to implement the functionality in the existing platform.

So now you have to ask the question: what is the best platform?

I think personally it will depend on who's doing the work and what they are comfortable with.

If you have very specialized legacy platforms then that will probably stick until someone decides to upgrade to another platform.

If you have people that are more willing to migrate to new technologies then you could see quick shifts to things like MATLAB and bridging software that connects to Oracle or IBM databases and then to SAS and other technologies.

The really big software packages allow this kind of development to take place and if you can afford a highly paid programmer, then this is what they will do for you.

So I guess in short, the thing I wanted to say was that its all about integration to meet the needs of complex requirements and the culture and familiarity of the current platform will dictate whether one even wants to consider moving from that platform and migrating to something a bit more recent.
 
  • #3
gravitate to matlab? what do you think is behind matlab's array-handling, matrix-solving, linear algebra-capabilities? Fortran 90! So, as it is, I do my engineering calculation directly in Fortran 90, handling arrays and matrices as easy as you do in MATLAB and do it all for free...no need to pay thousands of dollars to keep MATLAB licenses around. Feel the need to higher level, friendlier, more capable on non-number-crunching things? glue it all together with python.

...but that's just me...oh, no, wait, it is not just me...a bunch of other engineers and scientist are doing it. :smile:
 
  • #4
MATLAB is a different platform to a pure C++ or FORTRAN environment.

It's the platform that is the issue and the platform is not the code: don't make that mistake.
 
  • #5
Actually, current versions of Matlab are written in C. However, what language a package (either commercial or FOSS) is written in is irrelevant. The question was what will future scientists use?
 
  • #6
Chiro: The platform alone is not what the issue is; the first thing that Aaronvan wondered was whether C or another language (not framework or platform) would replace Fortran; THEN, also wondered if one day engineers would gravitate to higher level packages like matlab.

All I wanted to say is that Fortran 90 is free and has native array handling and that the "higher level" language of choice is increasingly becoming python (numpy, scipy, matplotlib). Python is sneaking into becoming the scripting language of choice for many open source programs like Blender, FreeCAD, Salomé and even commercial one like SAS and I am sure other one...but I wouldn't know because I don't have the need for commercial packages.

Aaronvan: MATLAB the front-end may be written in C, but, like I said, the backbone linear algebra package is in Fortran 90. You can visit their website and dig around.

I don't know how much into the future you want to speculate into...I mean, I am sure that eventually, there would be no need to know programming...you would simply tell the computer what you want to do and it would do it...people are already working on this.

gsal
 
  • #7
Fortran will probably not outlast many of us, but it's pretty darned good. When I hit engineering school, we had to learn CUPL, and then move right to Fortran. A few years later, I was doing heat-and-mass balances around a new pulp mill, and Fortran was the go-to. Save the work to tape and send the tapes to the headquarters in Chester, PA, and wait for results.
 
  • #8
If you compare say Fortran II and Fortran 2003, there was (and is) a lot of truth in the old joke, "Scientific programmers don't care what language they use, so long as it's called FORTRAN". (And the other half of the joke was "Commercial programmers don't care what their language is called, so long as the syntax is identical to COBOL").
 
  • #9
Are new engineers still learning Fortran?
 
  • #10
Fortran is easy to learn and specifically designed for numerical computing. Its array handling ability is legendary and extremely fast. Its been around forever, so it has heaping helpings of libraries for almost any number crunching task you can imagine that is of interest to scientists. It also has excellent backwards compatibility. Code written 30 years ago can still be compiled. The easy to learn part is a big deal to scientists, who are generally not inclined to pursue an IT minor. You can learn everything you need to know in a single one semester class.
 
  • #11
I don't think "new" engineers are learning Fortran. Clearly, colleges stopped teaching Fortran and started to teach C and probably C++ (without teaching C first) and other colleges probably just teach Java (without teaching C first, etc).

The thing is that Web stuff is out there and everybody sees it and know about it, so, certain languages are popular and marketable.

The fact is that a very reduced part of the population are engineers and scientists.

The "new" engineers that need to learn Fortran, simply do as soon as the join the their corresponding field and/or industry...

Fortran is simple to learn and can be done by oneself. If you do not use ALL UPPERCASE to write your code, it is a very clean looking code, without braces or semicolons and all those ornaments.

...I started a brand new program a few weeks ago (fluid flow, Joule losses, cooling, etc) kept the flow calculation and gave the temperature calculation to a "new" engineer half my age, I told him we would do it in Fortran...gave him a couple of links to read up on it, let him see my own code (through git...he is in Europe, I am in America)...he already told me how much he likes Fortran and how easy it is to program.
 
  • #12
Can I browse the code in your git repository?
 
  • #13
The software is proprietary and git repository behind the firewall. Sorry if I gave you the impression this was an open source; I work for a private company with offices around the world, I find myself working with people in Europe and Asia in my daily work life.

You can get your fill of Fortran programs and libraries from various on-line sites, here are some that would get you started:

http://fortranwiki.org/fortran/show/Libraries

http://www.fortran.com/tools.html

http://www.fortranlib.com/freesoft.htm

http://jean-pierre.moreau.pagesperso-orange.fr/f_matrices.html
 
  • #14
No prob. Thanks for the links. I'll check them out.
 
  • #15
Aaronvan said:
Are new engineers still learning Fortran?
Some, perhaps very few, do. These days there has been a push to do scientific programming in C++. However, there is a huge amount of legacy code written in Fortran, and many older scientists and engineers prefer to keep working in Fortran. Some major engineering companies still develop their analytical software in Fortran.

I work on similar projects using C++ or Fortran, and in some cases a mix. I'm not proficient at C++, but in time, I hope to improve. I'm more comfortable in Fortran.
 
  • #16
gsal said:
Chiro: The platform alone is not what the issue is; the first thing that Aaronvan wondered was whether C or another language (not framework or platform) would replace Fortran; THEN, also wondered if one day engineers would gravitate to higher level packages like matlab.

There have been new languages and programming paradigms that will replace FORTRAN (or fortran) almost since it was invented ... Algol, anyone?

I don't know how much into the future you want to speculate into...I mean, I am sure that eventually, there would be no need to know programming...you would simply tell the computer what you want to do and it would do it...people are already working on this.
gsal
they've been working on it for ages .. LISP, anyone? o:)

Looking at what's actually happening at the moment, eg preference analysis, I suspect we won't actually have to tell the computer to do anything - it will know it before you do because it's either worked out what you're likely to want or will have influenced you to want what it's going to give you.

I also suspect that if you asked to see the generated code it would prove illuminating ...

HUMAN: "Hey, but, but, ... that's FORTRAN!"
COMPUTER: "Aye, lad. if it were good enough for my grandad, it's good enough for me."
 
  • #17
Astronuc said:
Some, perhaps very few, do. These days there has been a push to do scientific programming in C++. However, there is a huge amount of legacy code written in Fortran, and many older scientists and engineers prefer to keep working in Fortran. Some major engineering companies still develop their analytical software in Fortran.

I work on similar projects using C++ or Fortran, and in some cases a mix. I'm not proficient at C++, but in time, I hope to improve. I'm more comfortable in Fortran.

Much agreed, I have to push my new hires to learn FORTRAN because of our legacy codes which are written in a mix of FORTRAN/C++. Over the years I have found that C++ is good, but if you want pure computational speed for numerics, FORTRAN is the way to go, you just can't overcome the 50 years of development and tweaking of routines for speed in FORTRAN over the 30+ years of C/C++ which was written primarily for UNIX boxes and data manipulation.

After 15+ years of pure FORTRAN programming, I am now more comfortable in C++ having programmed that more the past decade or so. I can think of only one major project where I used FORTRAN from start to finish lately.
 
  • #18
Dr Transport said:
Much agreed, I have to push my new hires to learn FORTRAN because of our legacy codes which are written in a mix of FORTRAN/C++. Over the years I have found that C++ is good, but if you want pure computational speed for numerics, FORTRAN is the way to go, you just can't overcome the 50 years of development and tweaking of routines for speed in FORTRAN over the 30+ years of C/C++ which was written primarily for UNIX boxes and data manipulation.

After 15+ years of pure FORTRAN programming, I am now more comfortable in C++ having programmed that more the past decade or so. I can think of only one major project where I used FORTRAN from start to finish lately.
I've traditionally used Fortran as our legacy codes (and those of others) are written in Fortran. Although I've heard about C++, I wasn't really introduced to it until a few years ago. It seems to be the preferred language for massively parallel computation (e.g., multiphysics FEA/CFD on various time and spatial (meshes) scales) - on clusters or supercomputers.
 
  • #19
Fortran could really scream on the computers of the '70s. Compared to the computation rates of modern computers and software, early Fortran might appear primitive and ineffective in comparison. Fortran was used to model products and services that we all used.

I am not active in engineering/technology but is difficult to imagine that Fortran will die. Too much good, tight code out there. (BTW, "tight" means sparse and effective, and runs really fast on crappy processors.)
 
  • #20
I'm actually in the beginning phase of porting some FORTRAN simulation code to C++ right now. It's really the only important FORTRAN code we have in the lab I work in. General stuff is in Python or MATLAB, while embedded is C/C++, along with performance-critical stuff. A lot of prototyping is done in MATLAB. (I hate MATLAB, but most people seem to know it.)

All the fluids people I know are married to FORTRAN*. The structures people in my department seem to mostly use C++, as do dynamics & control (my field/specialty). I'm pretty sure FORTRAN is always going to be around.

I personally prefer C. I think C++, useful as it is, is overly complicated and bloated. If I get some time I also want to look at Google Go, which I think is an interesting language for distributed systems.[*] Is there any way to write it but in ALL CAPS? :)
 
  • #21
Those of you who have been able to learn a programming language on your own are brilliant. I am not so. I have been able only to practice some BASIC during the last several years and have written some useful programs. I have not been able to learn ANY programming language on my own, except for one or two forms of BASIC. There are a few types of BASIC which work in and are designed for use in Windows, and one of them is what I have learned to use.

I would like to learn FORTRAN but do not know what to find in order to begin. What program or programs to install, what books to find and study from (ABSOLUTELY NO websites for instruction on FORTRAN -- I need a good book). In the old days, there was a "computer center" with terminals, and we did not need to install anything and we did not go to "websites" or any "internet". The computer screen only showed us a black screen with white text. Today, we can obtain portable computers and run installers to put copies of working software onto it. Things have evolved in so many ways but I would still like to learn and practice FORTRAN. Any for free? Any for free that work in Windows XP and Vista? Require complicated adjustments and configuring?
 
  • #22
I'm neither a FORTRAN programmer nor a Windows user, but there is a Windows version of the GNU FORTRAN compiler gfortran.

Here's a install guide for mingw64 which provides the GNU compiler: http://sourceforge.net/apps/trac/mingw-w64/wiki/Downloading%20and%20installing%20MinGW-w64 [Broken]
 
Last edited by a moderator:
  • #23
I find linux distributions very convenient programming/development environments. You have everything you need immediately available after installation. Compilers ranging from fortran 77 and fortran 90 to c++, cobol, lisp, etc. as well as useful tools like 'make' and of course the command line tools like awk,sed,grep, etc.

A nice collection of books are the 'numerical recipes' books, the old ones for c and fortran can be found online at http://www.nr.com
Also, the large collection of small scientific programs of John Burkardt is quite good, in c,c++,fortran77,fortran90 at
http://people.sc.fsu.edu/~jburkardt/
He also has instructions on how to compile and run (in linux).
 
  • #24
All engineers and scientists at my U were learning MATLAB.

Note that MATLAB has OOP, classes, class inheritance, parallel programming capabilities (including GPU) and produces some of the prettiest and most customizable (and open to java programming) graphics available.

You can import java to matlab, drop a slash bang to the shell, and compile stand-alone executables.

On top of that, the high level programming, of course, allows for quick development.

However, I'm currently cosseting switching to python. Not as we'll supported, but everybody tha makes the switch raves about it.
 
  • #25
I have just learned fortran for weeks by making non-linear lifting line program because my instructor told me to use this language. I have learned visual basic, pascal, and c++ in high school and my freshman year, and MATLAB of course.

For me, fortran seems more simple to be written (not comparing this to MATLAB though), but so far I haven't understood its advantages in numerical calculation. Any suggestions how to understand about this? I mean how do I know whether fortran has better performance in numerical calculation than any other languages?

Anyway, to answer the question, I simply think fortran will still be used for at least 20-30 years later. Most of my instructors in fluid department prefer to use fortran. Matlab is just used for short coding.
 

1. Is FORTRAN still widely used in science?

Yes, FORTRAN is still widely used in scientific computing and remains one of the most popular programming languages for scientific applications.

2. Why is FORTRAN considered the premier programming language for science?

FORTRAN (short for Formula Translation) was specifically designed for scientific and engineering applications, making it highly efficient and reliable for these types of calculations. It also has a long history of use in scientific research and has been continuously updated to meet the needs of modern scientific computing.

3. Are there any alternatives to FORTRAN for scientific programming?

Yes, there are several other programming languages that are used in scientific computing, such as Python, MATLAB, and C++. However, FORTRAN remains a popular choice due to its speed and specialized features for scientific calculations.

4. Will FORTRAN eventually be replaced by another language in science?

It is unlikely that FORTRAN will be completely replaced in scientific computing, as it has a strong legacy and continues to be updated with new features. However, it may be used alongside other languages in certain applications.

5. Can I learn FORTRAN if I have no prior programming experience?

Yes, FORTRAN is a relatively easy language to learn, especially for those with a background in mathematics. There are also many resources and tutorials available for beginners to get started with FORTRAN in scientific programming.

Similar threads

  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
Replies
5
Views
3K
  • Programming and Computer Science
Replies
14
Views
4K
  • Programming and Computer Science
Replies
1
Views
3K
  • STEM Academic Advising
Replies
4
Views
2K
Replies
14
Views
843
  • Programming and Computer Science
Replies
2
Views
2K
  • Programming and Computer Science
Replies
29
Views
2K
Back
Top