Hacker News new | ask | show | jobs
by lpw25 4269 days ago
> This is why unsafePerformIO is unsafe: it’s completely foreign to the programming model

Maybe, although it is also not type safe because Haskell doesn't have a value restriction for polymorphism. (or looked at another way Haskell's value restriction assumes that function application is a value).

2 comments

And, by extension, we don't have a value restriction because unsafePerformIO is foreign to our programming model. If it was actually part of the abstraction, Haskell would be a lot more like ML!
It's not really trying to be type safe either. There are lots of ways to break types with unsafePerformIO