News for hackers. Stuff that matters.
Re:Lively Linear Lisp – 'Look Ma, No Garbage' (1991) by agumonkey on Tuesday May 02, 2017 @05:14PM (#14250672)
Wild guess, this is monadic style friendly right ? threading implicit variables (rng, etc) is often used in tutorials.
Re:Lively Linear Lisp – 'Look Ma, No Garbage' (1991) by theseoafs on Tuesday May 02, 2017 @05:16PM (#14250699)
Yep -- actually, if you look at how the IO type is defined in Haskell, it looks basically like this (there is an object that represents the "state of the world" that gets threaded through computations).
Re:Lively Linear Lisp – 'Look Ma, No Garbage' (1991) by agumonkey on Tuesday May 02, 2017 @05:39PM (#14250871)
Alright. One distinction though is that vanilla IO monad has no logical constraint on consumption. You could technically thread a resource through a function many times and Haskell wouldn't complain. (This is blurry but I had something clear in mind, someone at a Haskeel meetup showed how to enforce constraints on monads through some kind of Phantom Type trick)