-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should we implicitly inject the effects? No @@? #3
Comments
I think it shouldn't be implicit, just as on |
In my opinion you have to use The idea to use For example, say initially Would suggest to take a look at Railroad Oriented Programming (to get some inspiration) |
What if this spec was simply an extension for generators. And instead of Then all generator functions can have effects injected. All the monadic semantics are already there. Arguably async/await was just a specialization of a generator based coroutine, and that was largely required because promises weren't 100% monadic. But we can learn from that mistake and reuse the existing constructs. I still think the new If we did that, we wouldn't need |
@JAForbes I think that using generators to handle the effect will take out this proposal's major advantage: no function color. Also, updating the generator behavior to not need |
Currently we need to use
@@
whenever we want to inject the inhered effects on a function call.Should we keep it?
If not, how to infer that we need to inject the effects on a function call?
If yes, what should do if we call a function that launches an effect and we didn't inject the effects?
The text was updated successfully, but these errors were encountered: