3 ms·
Why would you need Fortran for anything other than math? To put it differently, what’s the problem with just using 2 languages, e.g. Fortran plus Python with f2
by m_mueller 3y ago
Why would you need Fortran for anything other than math? To put it differently, what’s the problem with just using 2 languages, e.g. Fortran plus Python with f2py?
- adgjlsfhk1 3y agoSometimes you want to write fast code for things that aren't purely numerical (e.g. any string processing such as CSV/Arrow/JSON etc) or things that are mostly numerical but benefit from abstractions (like generic algorithms so you can run programs in arbitrary precision or autodifferentiation). Fortran is pretty good for writing 3 loops over a double precision matrix. Aside from "why not Fortran" the "why not 2 languages" is because moving your implimentation to a language few of your users know creates a big barrier between users and developers of your code. In Python, ~90% of users don't even know the language that the packages they use are written in which makes it a lot harder for them to become contributors. Using a single language means that as users learn how to use libraries they are also learning how to contribute to them in the future.