Is Fortran Still Relevant? Comparing Fortran with Java and C++

Shahid Alam
DOI: https://doi.org/10.5121/ijsea.2014.5303
2014-06-12
Abstract:This paper presents a comparative study to evaluate and compare Fortran with the two most popular programming languages Java and C++. Fortran has gone through major and minor extensions in the years 2003 and 2008. (1) How much have these extensions made Fortran comparable to Java and C++? (2) What are the differences and similarities, in supporting features like: Templates, object constructors and destructors, abstract data types and dynamic binding? These are the main questions we are trying to answer in this study. An object-oriented ray tracing application is implemented in these three languages to compare them. By using only one program we ensured there was only one set of requirements thus making the comparison homogeneous. Based on our literature survey this is the first study carried out to compare these languages by applying software metrics to the ray tracing application and comparing these results with the similarities and differences found in practice. We motivate the language implementers and compiler developers, by providing binary analysis and profiling of the application, to improve Fortran object handling and processing, and hence making it more prolific and general. This study facilitates and encourages the reader to further explore, study and use these languages more effectively and productively, especially Fortran.
Programming Languages,Software Engineering
What problem does this paper attempt to address?
### Problems the Paper Attempts to Solve This paper aims to evaluate and compare Fortran with two of the most popular programming languages—Java and C++. Specifically, the paper attempts to answer the following key questions: 1. **To what extent do the new extensions make Fortran comparable to Java and C++?** - Fortran underwent some major and minor extensions in 2003 and 2008. Do these extensions make Fortran closer to Java and C++ in terms of functionality and performance? 2. **What are the differences and similarities among these three languages in supporting certain features (such as templates, object constructors and destructors, abstract data types, and dynamic binding)?** - The paper compares these three languages by implementing an object-oriented ray tracing application. Through this program, the authors hope to reveal the performance and characteristics of these languages in practical applications. ### Research Background and Motivation - **Current Status of Fortran**: Although Fortran remains a popular language in the high-performance computing (HPC) field, it is not very popular among general-purpose programming languages. According to the Tiobe language popularity index, Fortran ranks 33rd, while in another index it ranks 12th. - **Needs of the Scientific and Engineering Community**: Fortran has a long history in the scientific and engineering fields, and many compute-intensive tasks (such as weather and climate modeling, computational chemistry, and physics) are still written in Fortran. - **Significance of New Extensions**: To improve the efficiency and maintainability of Fortran in the software development process, Fortran underwent extensions in 2003 and 2008. These extensions aim to better support object-oriented programming and other modern programming features. ### Research Methods - **Ray Tracing Application**: The authors chose a basic ray tracing application as the comparison object. This program is neither too complex nor too simple, but complete enough to generate molecular model animations (visualizations). - **Software Metrics**: By applying software metrics (such as the number of classes, number of methods, number of attributes, etc.), the authors conducted a detailed comparison of these three languages. - **Binary Analysis and Performance Analysis**: By analyzing the compiled binary files and conducting performance tests, the authors revealed some shortcomings of Fortran in object handling and optimization. ### Main Contributions - **Comparison Results**: The paper demonstrates Fortran's capability in supporting object-oriented programming features and provides a detailed comparison with the other two languages. - **Optimization Suggestions**: Through the analysis of the ray tracing application, the authors provide improvement suggestions for Fortran compiler developers to enhance Fortran's capabilities in object handling and performance optimization. - **Promoting Further Research**: The paper encourages readers to further explore, research, and use these languages more effectively, especially Fortran. In summary, this paper evaluates Fortran's position among modern programming languages through practical applications and theoretical analysis, and proposes suggestions to improve Fortran to maintain its competitiveness in the scientific and engineering computing fields.