2 ms·
> but using Java APIs - it is disappointing that there can't be a cleaner join between the worlds. Maybe it can. But does it make sense? For example, you'd nee
by voxfrege 14y ago
> but using Java APIs - it is disappointing that there can't be a cleaner join between the worlds.
Maybe it can. But does it make sense? For example, you'd need a library that emulates the C stdlib functionality that is used in Haskell.
There are more subtle points. For example, in Haskell, you can throw an exception in another thread. You can't do that with JVM threads. I am not sure what it would take to make a JVM runtime system that supports this.
But observe that the more runtime code you have that keeps up the illusion of running a Haskell-RTS, POSIX, C stdlib world, the less you will be able to interact with the rest of the JVM. For, your Strings are not Strings, but lists of characters, your Boolean is a sum type, your Filedescriptors are some abstractions nobody else understands, your threads are not JVM threads, but something that can be interrupted form other such somethings, ... and so on and on.