News for hackers. Stuff that matters.
Re:Which Programming Languages Are Functional? by mightybyte on Wednesday December 30, 2015 @04:05PM (#10814361)
Haskell absolutely allows mutable references and arrays. See IORef [1] and MVector [2]. Notice how the functions that perform mutation are monadic. That's Haskell controlling the side effects and making sure that they don't pollute pure code. The ST monad stuff [3] that wyager mentioned is even cooler because it allows you to bundle up side effecting stuff and actually use it in pure code in a completely safe way, which is something that you can't do (without the dubious usafePerformIO) with the IO monad.

[1] https://downloads.haskell.org/~ghc/latest/docs/html/librarie...

[2] http://hackage.haskell.org/package/vector-0.11.0.0/docs/Data...

[3] https://downloads.haskell.org/~ghc/latest/docs/html/librarie...

There are no comments on this comment yet.