Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@arthur23 The correct answer, assuming the language supports such a pattern, is using promises instead of callback closures.
-
@bittersweet or async await which has broader support across languages.
You could also use coroutines or generators -
Python, C#, JS and Lua are the languages I have used the most yeah hahaha.
But I know Java also has async await and Go has goroutines which are coroutines... -
@creator I know @bittersweet is not wrong, you aren't either.
I was just pointing out some alternatives, since the solution depends on the language and it's features.
*rejected* 🤣
undefined