• Clay_pidgin@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    1
    ·
    1 month ago

    I’m barely competent at programming. What is the use case for Fortran, besides maintaining ancient code?

    • lad@programming.dev
      link
      fedilink
      English
      arrow-up
      13
      ·
      1 month ago

      A lot of computational heavy tasks for science were done in Fortran at least ten years ago (and I think still are). I was told that’s mainly because Fortran has a good deal of libraries for just that, and it was widely taught in academia so this is a common ground between the older and newer generations.

      I think it may be gradually superseded by Python, but I don’t know if it is

      • Troy
        link
        fedilink
        arrow-up
        8
        ·
        1 month ago

        A lot of the underlying libraries in python are actually written in Fortran (or were when they were conceived, and the Fortran components later replaced). Numpy, for example, was originally pretty much a wrapper on top of BLAS and LAPACK.

    • Troy
      link
      fedilink
      arrow-up
      7
      ·
      1 month ago

      It was designed from its very start to be used for numerical computing. So the language it built around it and it sort of excels in that use case.

      This used to be the holy bible of numerical methods, if you want to see some sample code: https://s3.amazonaws.com/nrbook.com/book_F210.html