13 ms·
> Perl's the only non-lisp I'm aware of that does dynamic binding well-enough to get the idea, [...] Well, Haskell does dynamic binding in the form of the Read
by eru 1y ago
> Perl's the only non-lisp I'm aware of that does dynamic binding well-enough to get the idea, [...]
Well, Haskell does dynamic binding in the form of the Reader Monad. It's well received there.
- geocar 1y agoErm no. The point is I want to have the ability to make any variable dynamic, not just work with a global variable that is really a getter.
- eru 1y agoThe reader monad doesn't need to be global. But yeah, by that standard, Haskell implements both dynamic scoping and mutable state via getters and setters. (Though, of course, you can go all out on these via lenses.)