Fortran (better suited to programming section)

Click For Summary

Discussion Overview

The discussion revolves around the future of programming languages in scientific computing, specifically questioning whether Fortran will continue to be relevant or if languages like C, C++, or Python will dominate. Participants express their views on the suitability of various languages for scientific applications, touching on aspects of usability, efficiency, and community support.

Discussion Character

  • Debate/contested
  • Technical explanation
  • Exploratory

Main Points Raised

  • Some participants argue that Fortran, despite its age, remains efficient for numerical programming due to its evolving nature and compiler optimizations.
  • Others propose that C# is a superior programming language due to its ease of use compared to Java, although its cross-platform capabilities are questioned.
  • Some participants highlight the limitations of proprietary languages like Matlab, suggesting they may hinder collaboration due to licensing issues and platform support.
  • There is a viewpoint that Matlab serves as a useful tool for initial problem-solving but should not replace full programming languages like Fortran or C++ for complex scientific computations.
  • One participant notes that Fortran has a significant amount of legacy code and community acceptance of extensions that enhance performance on supercomputers.
  • Concerns are raised about the efficiency of memory management in C# when handling large data sets, contrasting it with the speed and compactness of C and C++.

Areas of Agreement / Disagreement

Participants express a range of opinions on the effectiveness of different programming languages for scientific computing, with no clear consensus on which language will prevail. Disagreements exist regarding the value of proprietary languages and the relative merits of C#, Fortran, C, C++, and Python.

Contextual Notes

Some participants emphasize the historical context of programming languages and their evolution, while others point out the limitations and trade-offs inherent in each language's design. The discussion reflects a variety of perspectives on the practical implications of using different programming languages in scientific contexts.

mechprog
Messages
27
Reaction score
0
The following question pertains to programming, but I have posted it here because I want the views of mathematicians (also of physicists and engineers), not those of computer scientists (which i already know) and I do not know how many of the former category care to look into programming section.

The question is already having hot debates elsewhere, I do not know why it is not addressed here (as far as I know). I have also consulted Stroustrup on a related topic!
Wait's over-- here is the question (quite simple, though I do not know the same aspect for answer):
For scientific computing what will be the language of the future. Will Fortran be (or it already is) dethroned for that? Is C or C++ or even python going to be the lingua franca of scientific community (for programming)?
There are points I consider worth sharing (or they are already well-known), but let us first start discussion!
 
Technology news on Phys.org
Speaking of me I thing that the best programming language everywhere is C#.
It's like Java, but much more easy to use and much more convinient.
 
Fortran is an extremely old programming language, so it's inevitable that in some ways it shows its age. However, the language has continued to evolve, and it is possible to write modern fortran in such a way that it is readable and maintainable. Fortran is one of the most efficient languages available for numerical programming. It can be more efficient than C, the reason being that the fortran "do" loop is less flexible than the C "for," and therefore the compiler knows more information that can allow it to optimize the loop.

nns2009 said:
Speaking of me I thing that the best programming language everywhere is C#.
It's like Java, but much more easy to use and much more convinient.

I disagree for two reasons. (1) Every programming language incorporates certain design trade-offs, so there will never be a single language that is the best for all purposes. (2) Historically, all proprietary programming languages have been dead ends. C# is not completely proprietary, but its legal status is murky: http://en.wikipedia.org/wiki/C_Sharp_(programming_language)#Standardization_and_licensing
 
bcrowell said:
Historically, all proprietary programming languages have been dead ends.
One word: Matlab.
 
D H said:
One word: Matlab.
That's a good counterexample, although I would still claim that my statement is highly accurate as a general rule, especially about general-purpose programming languages. I'm sure there are tons of proprietary special-purpose languages out there, e.g., for running computer-controlled mills. Mathematica is another proprietary special-purpose language that is widely used.

Another point to consider is that Matlab is cross-platform. Although C# is theoretically cross-platform, in reality it is only well supported on Windows. There is no full implementation (including all the GUI libraries, etc.) that runs on other operating systems.

In academic work, one of the issues you're going to run into with the use of any proprietary language is that it's going to get in the way of collaboration if your collaborators run an operating system on which it's not well supported or they don't want to pay licensing fees.
 
Last edited:
Adding more fuel...
Matlab (C# is of no concern for us, at least in the present scenario) can never over shadow the importance of a full fledged programming language for scientific computations which is owned by the scientific community (not by a particular organization). It is at most popular for fairly (not extensively) complex problems. Many numerical analysts suggest initial working with Matlab (a numerical analysis environment rather than a language) and writing final programs (which are a lifelong saving) in some true programming language. I am unable to imagine that it will replace instead of complementing the Fortran (or C++ etc) in this field.
C# is the answer to Java from Microsoft*. But Java itself does not have much for us.
The main compititors are Fortran, C, C++ and python.


*Long long ago when computers were used solely by scientists and engineers softwares or programs were looked upon as a piece of art (just like a novel or a poem). Later commercialization occurred software were started to be viewed as purchasable goods. Now again open source movement is...
 
bcrowell said:
Although C# is theoretically cross-platform, in reality it is only well supported on Windows. There is no full implementation (including all the GUI libraries, etc.) that runs on other operating systems.

I am a C# fan and have many intensive processing applications running on Linux. The http://http://www.mono-project.com/Main_Page" has done great work and the mono framework runs seamlessly on Linux. The free SharpDevelop IDE is as good if not better than MicroSoft products. I haven't done many GUI applications in Linux so cannot comment too much, but I am sure GTK will improve over time.

http://http://sourceforge.net/projects/zedgraph/" works great to create jpg graph files for web applications and publishing. Only 2D though.

In the 90's I moved from C to C++ for the obvious advantages of object orientation and in the 2000's to C#. What is nice about C# it does a lot of work for you especially cleaning up allocated memory and remove pointer confusion. This helps a lot to focus on the application and not waste many hours with memory deallocation bugs and such. However the mono framework is heavy and the memory manager I found is not very efficient especially if you start pushing large quantities of data into memory.

You cannot beat C or C++ for speed and compactness, so I still do C++ for some applications. Have done a few Python projects and it seems reasonable, a lot of people use it and it's easy to learn for someone new to software development. I avoid C now just because of the lack of object orientation. You can spend hours debugging silly memory/pointer problems as it allows you the freedom to really get yourself into trouble if you are not very disciplined or experienced.
 
Last edited by a moderator:
Fortran has three things going for it. One is a large library of source code that would take many man-years of effort in order to convert it to another language. Two is that the scientific community is willing to accept computer specific extensions to Fortan in order to increase speed on certain super-computers. I assume that some of the older extensions have become part of the core language now. Three is the fact that there seems to be more effort put into optimizing Fortan compilers (along with those extensions), than other compilers on certain super-computers.
 
CyMark sorry, but your post is out of context here (it seems you are comp sci engineer--i am more interested in mathematicians' views). Just to avoid that I had started this discussion in Maths section, but mentors paid no heed to my considerations!
 

Similar threads

Replies
16
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 397 ·
14
Replies
397
Views
22K
  • · Replies 59 ·
2
Replies
59
Views
12K
  • · Replies 102 ·
4
Replies
102
Views
4K
  • · Replies 26 ·
Replies
26
Views
4K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 54 ·
2
Replies
54
Views
5K
Replies
7
Views
3K
Replies
11
Views
16K