News for hackers. Stuff that matters.
Re:Time Travel in Haskell (a function's output is passed as ... by Readmore on Tuesday April 10, 2007 @03:49PM (#11447)
Okay... how do you do this in Lisp? Also, PG, does Arc support Time Travel instructions? ;)
Re:Time Travel in Haskell (a function's output is passed as ... by dfranke on Tuesday April 10, 2007 @04:17PM (#11458)
Fully reentrant continuations feel a lot like time travel.

In fact, I once overslept my first class because when my alarm went off and I woke up groggy, I shut off my alarm thinking "I'll just remember my current continuation and if I oversleep I'll call it back later with an error."

Re:Time Travel in Haskell (a function's output is passed as ... by notabel on Tuesday April 10, 2007 @04:04PM (#11451)
Doing it in Lisp would be exceedingly tricky, since, while most dialects have some sort of laziness construction, it's explicit, so you don't get the automatic evaluation order reduction that happens in Haskell.

(NB: Unless I'm wrong. I've never tried it, it's possible that there's some nice trick for it that just isn't occuring to me.)

It's unlikely that the situation is any different in Arc; Haskell is just fundamentally different from other languages (other than Clean), in that lazy evaluation is the default behavior. In Lisp you can ask to create a thunk and then ask to evaluate it later; in Haskell, everything is a thunk, and the compiler/runtime evaluates it when needed.