4 ms·
Worth pointing out that this approach isn't particularly helpful when wrapping mutable Java objects, because Java land still has a reference and can/will mutate
by dustingetz 11y ago
Worth pointing out that this approach isn't particularly helpful when wrapping mutable Java objects, because Java land still has a reference and can/will mutate the object right underneath us. So we still need to write our Fredge code in ST.
- voxfrege 11y agoYes, that is true. But it is also not as relevant as one might think. Consider how many Haskell programs actually use mutable C data, or export functions that take a foreign ptr to some mutable stuff. Why should this be generally different in Frege? Useful Java APIs will be wrapped and sanitized through Frege libraries, and that is it then. You can go directly to Java, just like you can directly go to C in Haskell, but it turns out one rarely actually does this.
- dustingetz 11y ago> You can go directly to Java, just like you can directly go to C in Haskell, but it turns out one rarely actually does this. This might be the reason that haskell has not enjoyed nearly the adoption of Scala and Clojure.