Fortran Fortran (better suited to programming section)

AI Thread Summary
The discussion centers on the future of programming languages for scientific computing, specifically questioning whether Fortran will be replaced by languages like C, C++, or Python. While Fortran is recognized for its efficiency in numerical programming and has evolved to remain relevant, there are concerns about its age and readability compared to newer languages. C# is mentioned as a user-friendly alternative, but its proprietary nature and limited cross-platform support raise issues for collaboration in academic settings. Matlab is acknowledged for its utility in numerical analysis but is seen as a complement rather than a replacement for established programming languages. Ultimately, the conversation highlights the ongoing relevance of Fortran alongside emerging languages in the scientific community.
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!
 
Back
Top