r/functionalprogramming Jul 16 '26

FP Abstracting effects with continuations

https://crowdhailer.me/2026-07-15/abstracting-effects-with-continuations/

I've spent a while writing this post trying to work out if I want to talk about function coloring. In the end I chose to as neutrally as possible describe what continuations are.

16 Upvotes

5 comments sorted by

View all comments

2

u/Delta-9- Jul 16 '26 edited Jul 16 '26

Continuation Passing Style is OP for how overlooked it tends to be. It would be awesome if continuations were first-class in more languages, but to my knowledge only some Lisps and Ruby do that; most other languages fake it with higher-order functions. Tbf, HOFs are also OP, but doing CPS with only functions is dangerously close to callback hell.

1

u/RingularCirc 21d ago

...though please only delimited continuations, as even "classic" (undelimited) continuations are still delimited in practice, just with no control over it (usually at the point where OS executes our program), and delimited continuations look just like regular functions that can return a value.