Hacker News new | past | comments | ask | show | jobs | submit login

Although I would prefer to not ever see Fortran code (as I don't know how to call into it easily, C implementations are easier to embed in any language), some numerical methods with simple code but heavy math are just not reimplemented too often.

I believe the real value in Fortran is in these libraries that handle numerical edge cases as well. It would be much easier to move them to a newer language if they would contain unit tests, but they usually don't, so it's just not worth the risk sometimes.




The Fortran language defines a pretty clean FFI to bind to other languages. It’s not really any harder than binding to C code, which is why it’s called BIND(C) and ISO_C_BINDING. That was introduced in F03. The only period when it was murky how to interoperate was in the 90s and early 00s when compiler vendors had their own array descriptor structures that didn’t agree with each other. I worked on a language interop tool back then and spent way more time than I’d have liked reverse engineering those undocumented data structures for all of the compilers at the time.


That is surely an implementation specific complaint; calling FORTRAN code from other languages was always very easy on VMS (same with Pascal, BASIC, whatever else)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: