Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
jbz
@jbz@indieweb.social  ·  activity timestamp 2 months ago

Is Fortran better than Python for teaching the basics of numerical linear algebra? – Dr. Jean-Christophe Loiseau

https://loiseaujc.github.io/posts/blog-title/fortran_vs_python.html

#fortran #python #programming

Dr. Jean-Christophe Loiseau

Is Fortran better than Python for teaching the basics of numerical linear algebra? – Dr. Jean-Christophe Loiseau

Quarto Academic Website Template adapted by Dr. Gang He
  • Copy link
  • Flag this post
  • Block
Tom Ritchford
@TomSwirly@toot.community replied  ·  activity timestamp 2 months ago

@jbz

https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headlines says "No".

For a beginner (and for me, who learned Fortran in the 1970s, and has over 20 years experience with Python), having a command line interface to the language makes it much, much easier to experiment with.

Betteridge's law of headlines - Wikipedia

  • Copy link
  • Flag this comment
  • Block
Tom Ritchford
@TomSwirly@toot.community replied  ·  activity timestamp 2 months ago

@jbz Oh, and he prefers Fortran because it's strongly typed, but the strength of modern Python typing is quite high. Most professionals now just start off each project by throwing a type checker and a linter into the tool chain from the very start. (For me it's mypy and ruff, but it might well by pyrefly and ruff fairly soon.)

  • Copy link
  • Flag this comment
  • Block
aoanla
@aoanla@hachyderm.io replied  ·  activity timestamp 2 months ago

@TomSwirly @jbz or, as some of the commenters note (and he sort of hints at in his article), you could use Julia - which just supports all this stuff out of the box, has the 1-indexing that he wants, has strong (inferred) typing...

  • Copy link
  • Flag this comment
  • Block
spmatich vk3spm :blobcoffee:
@spmatich@ioc.exchange replied  ·  activity timestamp 2 months ago

@jbz interesting. I’m old enough to have done my 2nd year numerical methods course in Fortran. I find it odd that python won the popularity contest for numerical computation. For one thing, it’s an interpreted language compared with Fortran (or C) being compiled. Fortran (at least the one I learned) is not object oriented. So Fortran should be much more efficient, if less readily accessible. I would not be surprised if most of the heavy lifting library calls in numpy are not actually written in python but Fortran (or C).

  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login