Introducing ClosureChains to avoid "completion hell"

ClosureChain helps to simplify sequential async calls by providing a familiar try-catch pattern for async methods. It's a library that makes no promises and has no future. :laughing:

There's plenty of other more complicated solutions to this problem, but for those with simpler use-cases, I hope this helps.

1 Like

I don't want to be the bringer of bad news but async/await is already available in preview and might make your project deprecated: swift-evolution/0296-async-await.md at main ยท apple/swift-evolution (github.com)

Thanks for the info. I'm aware of it, hence my cheeky slogan for "having no future". :-) But in all seriousness, as someone having to make do with the current versions of Swift, I needed something to make async a little more friendly, even if it's a relatively short-lived library.

FWIW, ClosureChains also imposes no additional threads/queues/coroutines/etc in order to accomplish its task... in case that's a benefit to anyone.

3 Likes