3 ms·
SML# is one of the lesser known SML implementations, although it's a quite good one. The only thing that I found impractical,... you can only link 32bit libs, w
by alegrn 13y ago
SML# is one of the lesser known SML implementations, although it's a quite good one. The only thing that I found impractical,... you can only link 32bit libs, which is very odd on todays 64bit Systems.
Nevertheless, the thing I like most at SML# is the excellent FFI. You can just pass SML-records or SML-functions to C. SML# is very powerful if you code your applications in SML and C.
- silentOpen 13y agoThe recently released ocaml-ctypes <https://github.com/ocamllabs/ocaml-ctypes https://github.com/ocamllabs/ocaml-ctypes > library by Jeremy Yallop does something similar. It uses GADTs to represent the C type system in OCaml's type system with as-you-would-expect OCaml signatures. For example, you can pass an OCaml comparator to a C sort function that takes a function pointer and it works. It's not quite as smooth, as far as I know, but it will soon include C header consumption and C stub generation to both improve binding accuracy/safety and remove dynamic paths for performance.