In previous threads I haven't seen an in-depth discussion of algebraic effects as a solution to this problem, i.e. composing arbitrarily-many 'red' functions. Thoughts?
What color is your function? (2015)
11–20 of 63 posts
Re: What color is your function? (2015)
#12https://seospecialistssrilanka.com/2021/09/24/website-rankin...
Re: What color is your function? (2015)
#13Re: What color is your function? (2015)
#14Re: What color is your function? (2015)
#15Two years after this article was written, async-await was introduced in Javascript as a solution to this problem. As far as I understand.
Re: What color is your function? (2015)
#16In previous threads I haven't seen an in-depth discussion of algebraic effects as a solution to this problem, i.e. composing arbitrarily-many 'red' functions. Thoughts?
I would be really keen on seeing a mainstream-ish language that does algebraic effects or that can even implement them in a legitimate sense (discounting React’s implementation here, for instance). Purescript tried, but are doing something different these days. https://purescript-resources.readthedocs.io/en/latest/eff-to...
Re: What color is your function? (2015)
#17I'm afraid I just don't quite understand why async/await don't solve the problem and instead sweep it under the rug, could someone explain it?
Re: What color is your function? (2015)
#18 result = asyncio.run_until_complete(func)
Also, having explicit async/await are a wait to tell you: here are the point in your code that have something doing unreliable side effects down there.You can then use this information to:
- move that code and group it, so you get the rest of the code sansIO style
- put that in a try/except, because this code WILL fail at some point
- think about the perfs of this part of your code, which is what you are doing async io the first place
I do wish that python coro would schedule themself automatically, like JS does, and return a future that you can await explicitly. But that ship as sailed.
Re: What color is your function? (2015)
#19Zig’s functions are colorblind: https://kristoff.it/blog/zig-colorblind-async-await/
Re: What color is your function? (2015)
#20Zig’s functions are colorblind: https://kristoff.it/blog/zig-colorblind-async-await/