News for hackers. Stuff that matters.
Re:Which Programming Languages Are Functional? by wyager on Wednesday December 30, 2015 @12:28PM (#10813111)
Haskell actually does allow mutability in pure code using the ST monad.

It's pretty cool; you can use ST to have mutable variables and arrays and such, but the mutable values aren't allowed to escape the ST "context". So you're still guaranteed immutability outside of the ST monad, because the type system locks all mutable values inside the monad.

This is mostly only used in very-high-performance libraries that use algorithms based on array access.

There are no comments on this comment yet.