Discussion on Tracking Asynchronous Effects in Type System
If you run an asynchronous effect with
On the Effect website, it mentions that this was considered but ultimately dropped for 2 reasons:
[from https://effect.website/docs/getting-started/running-effects/#synchronous-vs-asynchronous-effects]
I'm not sure what was tried in earlier versions that led to this conclusion (I could be totally missing something!), but I can imagine a relatively straightforward way to implement this check that would not limit composability or harm dx.
I'll continue in the thread since I'm length limited ->
runSync, you get a runtime error but no type error. It would be nice if we could keep track of which effects are asynchronous so we could prevent this.On the Effect website, it mentions that this was considered but ultimately dropped for 2 reasons:
[from https://effect.website/docs/getting-started/running-effects/#synchronous-vs-asynchronous-effects]
I'm not sure what was tried in earlier versions that led to this conclusion (I could be totally missing something!), but I can imagine a relatively straightforward way to implement this check that would not limit composability or harm dx.
I'll continue in the thread since I'm length limited ->
Effect Documentation
Learn how to execute effects in Effect with various functions for synchronous and asynchronous execution, including handling results and managing error outcomes.
