4 ms·
Fortran is not a better choice unless you are only thinking about the immediate needs of the course. In the wider world, Python is going to be a lot more useful
by criddell 1y ago
Fortran is not a better choice unless you are only thinking about the immediate needs of the course. In the wider world, Python is going to be a lot more useful to the students.
- cultofmetatron 1y agoif you're smart enough to learn fortran and learn to impliment and undersatnd numerical methods in it, I would argue that learning python will be an afterthought. You can learn python along with numpy in a week tops if you already understand the theory. I believe a lot of numpy libs are written in fortran code anyway though I could certainly be wrong there.
- esafak 1y agoWhy learn Fortran? If you want nice things stop propping up dinosaurs. Let it die already. Teach them numerical algorithms and have the students contribute to a better language's BLAS, LAPACK, or numerical library like numpy, jax, scipy, etc. Be part of the solution.
- cultofmetatron 1y agofortran is still very much the GOAT when it comes to numerical methods. to the point where all the modern fancy numerical methods libraries still squeeze out performance by calling out to libraries implemented in fortran. Its far from dying. its very good at its niche.
- adgjlsfhk1 1y agoThis isn't true. Openblas and MKL are both C/C++ with assembly hardcoded microkernels. SciPy is in the process of removing the last of their Fortran because no one wants to maintain it, and newer methods in other languages are faster. Fortran hasn't been in the core of everything for decades.
- zevets 1y agoFor better or worse, Fortran is still a popular language to write clever PDE schemes in, as it maximizes "time to first, fast-enough-running code". But for anything with a userbase of more than ~15 people, C/C++ are widely preferred.
- adgjlsfhk1 1y agoJulia is starting to pick up steam here. It's a lot easier to write mixed precision algorithms in since the type system is pretty much designed for efficiently writing generic algorithms (and it doesn't hurt that Julia's ODE solvers are SOTA)
- wolvesechoes 1y ago> Julia is starting to pick up steam here First time I saw this claim was over 9 years ago.
- TheRealKing 1y agoWe must disclose that @adgjlsfhk1 works for JuliaComputing. Sometimes they forget to do so on their own.
- syockit 1y agoLAPACK is still Fortran, even in OpenBLAS where they only have f2c translated codes but hardly any assembly kernels.
- dismalaf 1y agoFortran has modern versions and is much nicer for writing numerical code than C, C++, Rust, etc...
- jhbadger 1y agoToday, sure. But you could have made the same argument with Pascal being more practical in the 1980s. And yet here we are 40 years later with Pascal having become obscure and Fortran still with us. While ultimately any programming learning should be language independent, there's an argument to be made to stick to languages like Fortran which have a track record of being around a long time over whatever is currently popular.
- CJefferson 1y agoFortran is with us in a technical sense, but its use is tiny. I’ve done about six Fortran to python rewrite projects during my academic career. No-one has seriously suggested going the other way. I will bet you any amount of money you like Python will be more popular than Fortran in 5,10,20 and 30 years.
- spragl 1y agoYou are defintely not risk averse. Try to look back 30 years and see how much popularity has changed since then.
- tgv 1y agoThat's not the goal of learning the basics of numerical programming. Plus, anyone doing such a course should already know how to write code.