Skip to content
0:00 / 0:00

#continuations#scheme#call/cc

Continuations: The Swiss Army Knife of Flow Control

BP Learning

3.9K subscribers • 1 video on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.

Intermediate. Assumes working knowledge.

24K views8 years ago2 recommendations

Computer scienceProgramming languagesConcurrency and parallelismLanguage design and type systemsLisp and Clojure

An explanation of continuations as a control flow primitive, showing how they can implement exceptions, multithreading, and logic programming.

In this talk, we are discussing a programming construct called "continuations," which essentially allow points in your program to be saved and returned to at a later point. We are also discussing the many different flow control operators that can be built from this tool, including exception handling, multithreading, and logic programming.

Why it's here

2 people recommend this

What people say. Recommended as a good explanation of continuations and how they act as a powerful control flow primitive.

u/FunctionalFox1312in r/Clojure • Recommends

On “Continuations in Clojure”

Here's a good talk on continuations in Scheme. Here are some slides that explain Continuation Passing Style using both Lisp & JavaScript. Continuations are a control flow primitive. Have you ever used goto in something like C where you can just jump to a random line? You can think of continuations as a super powered, first class goto- you can pass around them around like normal variables, and invoke them at any time to jump to their point of creation. So far, you're right, couldn't we just do this with function calls? But continuations also *save the state of the program* when they are created, a snapshot of the callstack. That is something you can't exactly capture with function appli…

u/rain5in r/ProgrammingLanguages • Recommends

Continuations: The Swiss Army Knife of Flow Control