Fortran (better suited to programming section)

In summary: There are points I consider worth sharing (or they are already well-known), but let us first start discussion!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.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!Speaking of me, I think that the best programming language for general
  • #1
mechprog
27
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
  • #2
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.
 
  • #3
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
 
  • #4
bcrowell said:
Historically, all proprietary programming languages have been dead ends.
One word: Matlab.
 
  • #5
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:
  • #6
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...
 
  • #7
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:
  • #8
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.
 
  • #9
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!
 

1. What is Fortran and what is it used for?

Fortran (short for Formula Translation) is a programming language commonly used for scientific and numeric computing. It was created in the 1950s and is still widely used today for high-performance computing applications such as weather forecasting, computational fluid dynamics, and nuclear simulations.

2. How is Fortran different from other programming languages?

Fortran is a compiled language, meaning that the code is translated into machine-readable instructions before execution. It is also a statically-typed language, which means that variables must be declared with a specific data type before use. Additionally, Fortran has built-in support for scientific computing, such as complex numbers and arrays, making it well-suited for mathematical and scientific applications.

3. Is Fortran still relevant in modern computing?

Yes, Fortran is still widely used in many scientific and engineering fields due to its speed and efficiency in handling complex mathematical operations. It is also constantly updated and improved to keep up with modern computing standards and technologies. However, it may not be as popular in other industries such as web development or mobile applications.

4. Can Fortran be used for parallel computing?

Yes, Fortran has built-in features for parallel computing, making it a popular choice for high-performance computing applications. These features include parallel loops, array operations, and distributed memory programming techniques, allowing for efficient use of multiple processors.

5. How can I learn Fortran?

There are many resources available for learning Fortran, including online tutorials, books, and courses. It is recommended to have a basic understanding of programming concepts before diving into Fortran. Some popular resources for learning Fortran include the official Fortran website, Fortran forums, and online courses on platforms like Coursera and edX.

Similar threads

  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
12
Replies
397
Views
13K
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
Replies
1
Views
726
  • Programming and Computer Science
2
Replies
54
Views
3K
  • Programming and Computer Science
Replies
16
Views
2K
  • Programming and Computer Science
2
Replies
59
Views
9K
  • Programming and Computer Science
Replies
21
Views
1K
  • Programming and Computer Science
Replies
26
Views
3K
  • Programming and Computer Science
Replies
11
Views
14K
Back
Top