Re:Introducing Swift
by AlexanderDhoore on Monday June 02, 2014 @04:43PM
(#7836241)
I immediately thought about that as well. I wonder how they pull it off? Swift is not a functional language, so they just save every single variable, or what?
Re:Introducing Swift
by seanmcdirmid on Monday June 02, 2014 @04:54PM
(#7836310)
Time travel debugging has existed for a long time, and it's not limited to functional languages; the most obvious way they could do this is through checkpointing.
Checkpointing is a natural fit with the Cocoa API, which uses an event loop. Just save the state of the application after each event is handled.
Direct link to Elm's demo similar to Bret Victor's: http://debug.elm-lang.org/edit/Mario.elm (video: https://www.youtube.com/watch?v=RUeLd7T7Xi4)