3 ms·
> As a more general comment, using a GC language as the FFI target from a GC language is begging for difficult-if-not-impossible-to-debug crashes down the line.
by whateveracct 6y ago
> As a more general comment, using a GC language as the FFI target from a GC language is begging for difficult-if-not-impossible-to-debug crashes down the line.
Safe interop between two GC'd languages (Haskell and Java) was one motivation of Haskell's new -XLinearTypes extension
https://www.tweag.io/blog/2020-02-06-safe-inline-java/ https://www.tweag.io/blog/2020-02-06-safe-inline-java/
Generally, the new linear types are exciting but are nascent at the moment. But one extension to them (linear constraint [1]) seems to allow embed the equivalent of Rust's ownership in Hsakell using more primitive features in the type system (to my understanding..)
[1] https://arxiv.org/pdf/2103.06127.pdf https://arxiv.org/pdf/2103.06127.pdf