Haskell's missing mutable reference type
BurningWitness:
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.
I don’t understand. What is “this feature”? Your “contextual”?
BurningWitness:
A static reference table is the “missing” thing in the language as I see it.
OK, fine, and if that missing thing is added, I’ll add the API that I want on top. What’s wrong with that?
BurningWitness:
tomjaguarpaw:
With “references”, the libraries providing
LoggerandwriteUserDataneed 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.
I agree. But you said “With references the library would declare an implicit configuration” (my emphasis). I’m pointing out it’s not the library that declares the implicit configuration, it’s the caller.
Discussion in the ATmosphere