Earlier quoted context omitted.
Yea, Fortran is nice to use for so-called "scientific" computing. It has high performance as well as some handy intrinsic functions like DOT_PRODUCT and TRANSPOSE but the best features to me are colon array slicing syntax like Python/Numpy and arrays being indexed from 1 which makes converting math equations into code more natural without constantly worrying about off-by-one errors. I wouldn't call multi-dimensional…
e.g. "tensors" are like "vectors" in they transform in a specific way when the coordinate system changes; what felt so magic about vectors as an undergrad was that they embody "the shape of space" and thus simplify calculations. If you didn't have vectors, Maxwell's equations would spill all over the place. Tensors on the other hand are used in places like continuum mechanics and general relativity where something mo…
Learning Fortran (2024)
51–60 of 85 posts
Re: Learning Fortran (2024)
#52The article did not discuss this, but to me, one of the bigger differences between Fortran and more modern languages is the difference between functions and subroutines. Yes, they are not synonyms in Fortran and serve different purposes. I think this would trip up more people initially than the clunky syntax. It is also a bit funny that the author complains about older Fortran programs requiring SCREAMING_CASE, when…
What practical difference ever existed, beyond the fact that a subroutine does not return a value? AFAIK variable scope was handled identically. Recursion was likewise identical (forbidden originally).
Style wise, many prefer to reserve functions for things that resemble mathematical functions (i.e. only intent(in) and pure). In some sense a little bit similar to how people tend to use lambdas in python.
Re: Learning Fortran (2024)
#53Very good choice. Focus on the newest standard.
Re: Learning Fortran (2024)
#54The article did not discuss this, but to me, one of the bigger differences between Fortran and more modern languages is the difference between functions and subroutines. Yes, they are not synonyms in Fortran and serve different purposes. I think this would trip up more people initially than the clunky syntax. It is also a bit funny that the author complains about older Fortran programs requiring SCREAMING_CASE, when…
Re: Learning Fortran (2024)
#55The article did not discuss this, but to me, one of the bigger differences between Fortran and more modern languages is the difference between functions and subroutines. Yes, they are not synonyms in Fortran and serve different purposes. I think this would trip up more people initially than the clunky syntax. It is also a bit funny that the author complains about older Fortran programs requiring SCREAMING_CASE, when…
What practical difference ever existed, beyond the fact that a subroutine does not return a value? AFAIK variable scope was handled identically. Recursion was likewise identical (forbidden originally).
Re: Learning Fortran (2024)
#56I'm not sure one line of that would compile in FORTRAN 66, even if you indented it properly. Been so long I'm not sure...
Re: Learning Fortran (2024)
#57I wonder: is there any reason beyond sheer curiosity* to learn Fortran in 2025? Not being snarky, genuinely curious about what Fortran brings to the table. * Nothing wrong with that as a reason, of course
Yes. Some scientific computing code is still being developed in Fortran eg in HPC. (and has been for decades)
0 - https://docs.open-mpi.org/en/main/developers/bindings.html#f...
Re: Learning Fortran (2024)
#58 The NUMERICAL RECIPES in Fortran 90 book[0]
The NUMERICAL RECIPES website[1]
0 - https://www.cambridge.org/us/universitypress/subjects/mathem...Re: Learning Fortran (2024)
#59Re: Learning Fortran (2024)
#60I wonder: is there any reason beyond sheer curiosity* to learn Fortran in 2025? Not being snarky, genuinely curious about what Fortran brings to the table. * Nothing wrong with that as a reason, of course
Fortran in Modern Scientific Computing: An Unexpected Comeback - https://medium.com/@stack1/fortran-in-modern-scientific-comp...
5 Reasons Why Fortran is Still Used - https://www.matecdev.com/posts/why-fortran-still-used.html
Is Fortran better than Python for teaching the basics of numerical linear algebra? - https://loiseaujc.github.io/posts/blog-title/fortran_vs_pyth...
I take back everything i said about FORTRAN - https://x.com/ThePrimeagen/status/1745542049284423973
Modern Fortran online tutorial - https://wvuhpc.github.io/Modern-Fortran/