Some reflections about stdlib, where it stands and what it could become

Maybe this isn’t the right place, but I thought I would share why I don’t use stdlib (although I would like to eventually).

The main reason is the documentation. I don’t like how Ford looks and I find it difficult to navigate. It seems to be just gigantic unsorted lists of procedures/modules. I don’t know if its a thing on how stdlib setup their documentation, but the font is gigantic so the interfaces take up a lot of the screen and declarations overflow to the next line. It might be due to being incomplete, but half the procedures I look at don’t describe what they do (they just say what variables are input and what they might return) so I am confused on if I want to use them or not. Finding documentation hard to understand is why I switched from fpm to cmake in my projects (I went Makefile → fpm → cmake).

My second reason is related to what I mainly use Fortran for. I mainly use it for small-medium linear algebra heavy codes so I heavily use blas/lapack. I like being in control of my workspaces and how I call lapack so I just call them directly (no need for the stdlib wrappers). What I would like to use stdlib for are the things lapack doesn’t have. A lot of these things end up being small tasks, like sorting a vector and getting the sorting indices back, or something like Numpy’s isclose. If I check stdlib and find it has something similar to it, I decide that I would rather just spend the time coding it myself so I don’t have to add a large dependency to my project. Maybe if I knew stdlib had all of them before I started coding I would use it from the start. Last week I needed something like Higham’s expm which I couldn’t find in stdlib so I coded (a basic version) by hand.

4 Likes