External Publication
Visit Post

Haskell's missing mutable reference type

Haskell Community [Unofficial] June 10, 2026
Source

tomjaguarpaw:

Do you mean I shouldn’t use IOScopedRef (if it existed) to get the behaviour I desire

Not exactly, my point is that tacking dynamic allocations onto this feature is at best unnecessary and at worst would pollute the language with a second way to do something it already excels at.

A static reference table is the “missing” thing in the language as I see it.

tomjaguarpaw:

With “references”, the libraries providing Logger and writeUserData need not know anything about the existence of “references”. Only the caller need use them.

I don’t think this has anything to do with whether the references are static or dynamic, you can wrap the library either way.

Discussion in the ATmosphere

Loading comments...