3 ms·
Actually, having used the interfaces to OpenGL, SDL, GLFW, and several other native C libraries, I have to say this isn't the case at all. Haskell's FFI is pret
by rtperson 16y ago
Actually, having used the interfaces to OpenGL, SDL, GLFW, and several other native C libraries, I have to say this isn't the case at all. Haskell's FFI is pretty clean, which shouldn't be too surprising, since Haskell compiles natively, and so isn't relying on some VM translation layer. The headaches you have with, say, Java's JNI simply don't happen.
The headaches you run into have more to do with getting Haskell to recognize where the relevant dev and runtime libraries are, especially on non-Unix systems where library locations are not standardized. It's possible, but you end up having to hack the Cabal package, a process that is not particularly well documented at the moment.
Another issue is simple bitrot. Many libraries in Hackage were developed by students who have no interest in maintaining their thesis work post-graduation.