-
Notifications
You must be signed in to change notification settings - Fork 565
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
Switch from Eff to IO #3080
Comments
Woah woah woah woah, PureScript is getting |
@Pauan It was done via emoji-based Twitter poll — the most appropriate medium for language design discourse. |
@michaelficarra Thanks for the link. That's great news! I always really liked the idea of
|
Actually, it's been discussed in several other places before that, including on Slack, and on the |
Should we have a real issue about the name of |
Yes, sounds like a good idea. |
I don't know much of the background on this, but |
I'm slightly more in favour of keeping the |
Let’s discuss what we call it in purescript-deprecated/purescript-eff#25 perhaps? |
Sure, I'll port the comments over. |
+1 for having base |
Now that Eff is being replaced, what do you guys think of bringing back the restriction that rows can't have duplicate labels? |
Purescript-run wouldn’t be possible without duplicate labels. |
I think duplicate labels are a better, more principled choice for other reasons. |
I'm absolutely looking forward to this. Trying to write callbacks in React and stumble on Effects proliferation, since they spread upwards AND downwards, something I just learned, please go ahead! I have no substantial opinion on naming, but Eff/Aff seems ok, Aff is cool :-) |
To clarify, does this mean PureScript will no longer have extensible / algebraic effects in favor of a Haskell-style |
@darkf PureScript will still have algebraic effects in the |
@kritzcreek Fair enough, but why not keep the phantom row type? It's rather useful to demarcate effects, even if it's not entirely safe. I'll take a look at |
@darkf Check purescript-deprecated/purescript-eff#25 and see if that answers your question. EDIT: My TLDR: Effect rows are useful and once you're accustomed to them you can track lots of relevant information using them, but they don't make for a good default. They are anti-modular in that you need a canonical location for an effect like DOM, they create boilerplate, and introduce a layer of complexity for beginners/intermediate users that provides little benefit in their small/medium sized projects. |
@kritzcreek Thanks for the summary. I see the point now, but I still philosophically disagree with an all-encompassing IO monad... As a beginner (at least coming from Haskell) I found Eff easy to use and nicer than IO, and it lets me read (and write) what categories effects certain code will use. Will Purescript retain a tagged Eff monad, or will it be left to packages like |
The optimizer changes for @hdgarrood I assume we'll also need an instance for |
It'd be added to this instance chain https://github.com/LiamGoodacre/purescript-psci-support/blob/59ebfb83097629530249bba267384857d90d9638/src/PSCI/Support.purs right? |
🎉 |
Optimizer rules need to be updated as part of the switch to
IO
as the default effect monad.The text was updated successfully, but these errors were encountered: