What are Fortran and Cobol used for today?
stackoverflow.com
What are Fortran and Cobol used for today?
1–10 of 72 posts
Re: What are Fortran and Cobol used for today?
#2To complete the installation required me to choose from one of several current and compatible fortran compilers even.
So at least for fortran, the answer is scientific computing.
Re: What are Fortran and Cobol used for today?
#3Re: What are Fortran and Cobol used for today?
#4I was surprised to see when I installed R for the first time, that a large amount of the libraries it makes use of are written in fortran. To complete the installation required me to choose from one of several current and compatible fortran compilers even. So at least for fortran, the answer is scientific computing.
Part of the reason is that Fortran passes arrays by value, while C passes them by reference. It's very hard for compilers to optimise a pass-by-reference array, because it might have the memory altered by another part of the program. If it's pass by value, then you know it's safe. It's kind of like threads vs messages.
I think C has some recent work done to close the gap, but even if it's already as fast, it will take a while to port 50 years of legacy numerical code.
Re: What are Fortran and Cobol used for today?
#5Coming from a more traditional CS background, I always thought that Fortran was archaic until I actually had to learn it for some scientific computing. I found it awkward to use, but at the same time, it had array capabilities that I've never seen in any other language.
Re: What are Fortran and Cobol used for today?
#6Re: What are Fortran and Cobol used for today?
#7I was surprised to see when I installed R for the first time, that a large amount of the libraries it makes use of are written in fortran. To complete the installation required me to choose from one of several current and compatible fortran compilers even. So at least for fortran, the answer is scientific computing.
Fortran is far from extinct, because scientists often prefer it to C/C++, and it's often faster. Part of the reason is that Fortran passes arrays by value, while C passes them by reference. It's very hard for compilers to optimise a pass-by-reference array, because it might have the memory altered by another part of the program. If it's pass by value, then you know it's safe. It's kind of like threads vs messages. I…
Re: What are Fortran and Cobol used for today?
#8I believe we should think of Fortran as a domain-specific language for handling multidimensional arrays, rather than a normal programming language. It might be terrible for other things, but it's great for array computations, and that's what people use it for in big simulations. Since it has a well-defined C FFI nowadays, it's easy to connect it to other languages that can do other things (parsing data files, etc.).…
[1]https://github.com/muellermichel/Hybrid-Fortran (I'm the maintainer.)
Re: What are Fortran and Cobol used for today?
#9I was surprised to see when I installed R for the first time, that a large amount of the libraries it makes use of are written in fortran. To complete the installation required me to choose from one of several current and compatible fortran compilers even. So at least for fortran, the answer is scientific computing.
Re: What are Fortran and Cobol used for today?
#10I believe we should think of Fortran as a domain-specific language for handling multidimensional arrays, rather than a normal programming language. It might be terrible for other things, but it's great for array computations, and that's what people use it for in big simulations. Since it has a well-defined C FFI nowadays, it's easy to connect it to other languages that can do other things (parsing data files, etc.).…