3 ms·
In Haskell you could still escape with System.IO.Unsafe at any time. of course you could check your desiralised code isn't doing anything unsafe, but that's fa
by CJefferson 11y ago
In Haskell you could still escape with System.IO.Unsafe at any time.
of course you could check your desiralised code isn't doing anything unsafe, but that's fairly easy to do in Java too.
- codygman 11y agoThe way to do so in Haskell is putting "Safe" in the Language section of a cabal file, and it covers other stuff like partial functions IIRC. Are you saying that Java has something similar to SafeHaskell? Are you saying they are nearly the same? If yes to the last one, I feel that might be untrue. It's quite possible I just read through your comment too quickly though.
- CJefferson 11y agoIn Java, it's easy to run code under a SecurityManager, which lets you carefully control exactly what other classes the code can access. This gives you really fine-grained control, and lets you control very carefully what code is doing.