Hacker News new | ask | show | jobs
by jgtrosh 2929 days ago
It calls to mind Fortran-style function docs which would give a formula to compute the size of a work array for the caller to provide. That really ties the implementation to the header. It was really boring to work with, though it often pushed you to understand what was going on inside.
1 comments

This kind of interface was common in fortran 77. I’m guessing you’ve used BLAS/LAPACK? In more modern fortran, it’s not so usual. Also, Fortran is much more high level than C, and how memory is allocated etc is compiler dependent to a much larger degree than for C.

I’d recommend writing a Fortran 95 wrapper which creates work arrays for you if you really need to use such routines.