4 ms·
> * Futures is a crate that provides a common abstraction for delimited continuations I'm familiar with Java Futures, but can't tell if it's the same concept a
by thaunatos 10y ago
> * Futures is a crate that provides a common abstraction for delimited continuations
I'm familiar with Java Futures, but can't tell if it's the same concept as what you're talking about. What exactly is a "delimited continuation"?
- moosingin3space 10y agoThe best analogy I can give is to JavaScript promises, where you can do something once the future is resolved. In Java, this would be like the CompletableFuture class's thenApply function -- where you can write code that picks up once the future has been resolved. A "delimited continuation" is that basic idea of having your code pick up once a future finishes executing.
- steveklabnik 10y agoThey are roughly comparable, yes. Here's the explanation of futures specifically https://tokio.rs/docs/getting-started/futures/ https://tokio.rs/docs/getting-started/futures/
- mrkgnao 10y agoSomething like a -> (b -> r) -> r/the Cont monad? E: I meant to reply to a a sibling.