top | item 28511183

(no title)

peawee | 4 years ago

It's designed first and foremost to be a language to help compilers turn large matrix math operations into automagically vectorized and parallelized operations. If Rust is the language for close-to-metal memory-safe systems programming instead of C, modern (F90 and later) Fortran is the language for close-to-metal high-performance computational programming instead of C.

Thinking about it, I'd say the comparison to Rust for mastery of its particular domain is actually quite apt.

discuss

order

tomrod|4 years ago

It's a beautiful language!

I cut my teeth on Matlab, and flipped a coin for Python or Fortran as my language to focus on after Matlab tried to charge our HPC center per core.

Python won the toss, but I've always had a love for Fortran.

zozbot234|4 years ago

Rust is actually the first serious contender in this domain, given that it has native support for parallel, concurrent and distributed programming and also deals elegantly with the aliasing issue that hampers optimization in C/C++. It's nice to see that LLVM is getting an official Fortran frontend, it will ease interop (including with Rust) and make it easier to compare code generation across projects and languages.

chaxor|4 years ago

It's been my understanding that Fortran is loved by physicists due to it's procedural approach, and doesn't require learning objects and inheritance, etc.

There's a lot to learn in higher level physics, so having the simplest language, without tons of features to fiddle with, while also being very, very performant is preferable.

I have a feeling that much of this work end end up in Julia however.

bambataa|4 years ago

Was there once a battle between Fortran and APL and its derivatives for dominance of that niche?

I’m wondering why Fortran is dominant in physics yet APL in finance.

dhosek|4 years ago

I think that at least part of it is APL's dependence on specialized hardware (at least back when I last encountered it in the 80s). At the Claremont Colleges, most computing access was on VAXes running VMS, although there was a single Unix machine at Harvey Mudd and Pomona College had an IBM minicomputer with 3270 terminals (plus a couple of the IBM graphic terminals) and it was Pomona's system that was the only one that had APL because the 3270s could use the specialized character set while Mudd (the science/engineering school) did not. The big language push at Mudd back then was towards APL, perhaps because a lot of aerospace companies sponsored clinic projects (all engineering students and some other majors did a sponsored real-world project in their senior year).

I remember writing some data analysis code in Fortran for my freshman physics lab and the TA was surprised to see my choice of language.