4 ms·
Changing mutable state you've closed over is a side effect, so from your description I assumed that wouldn't be allowed in a function. Or are you talking about
by kybernetikos 5y ago
Changing mutable state you've closed over is a side effect, so from your description I assumed that wouldn't be allowed in a function.
Or are you talking about reading mutable state you've closed over where you're still a pure function (just with hidden arguments) but the environment might change and you can't send that over the wire.
- brundolf 5y agoThat's what I mean. Functions can't mutate anything, period- the assignment operator won't even parse, and calls to procedures are forbidden. But they can still close over state that is mutable one other contexts The full implications of allowing this in closures have yet to be explored and I still need to make sure they won't break the guarantees I'm wanting to offer