-
Notifications
You must be signed in to change notification settings - Fork 19
Use untagged IO
as default, with tagged Eff
to supplement.
#25
Comments
We have an |
See #20, although I think we should do it the other way around as a breaking change. |
I heartily agree with this idea. Eff's effects are described by strings (well, symbol/kind pairs), and are not semantic. One string in one library doesn't correspond to another string in another library (or sometimes corresponds to multiple in some chaotic and changing fashion), and there is no way to do algebraic effect introduction and elimination, which are cornerstones of a principled algebraic effect system. The row types in PureScript have been proven to be extremely useful, but I'd argue the effect system that piggybacks on row types has created enormous work for developers and adds layers of complexity not found in Elm, for no more actual guarantee of compile time benefits. An IO type would make PureScript dramatically simpler, more accessible, and easier to use, while not sacrificing anything significant (strings in row types are still strings!). I know Bodil and several others have a similar opinion here. |
Regarding naming, some comments from elsewhere.
me:
|
I personally am not sure that we should prioritise update overhead vs what name would make the most sense, especially since we are still pre-1.0. Given that (afaict) the name |
The The name If we do want to switch to the IO name, I'll see what @jdegoes thinks about donating the |
Of course our Generally we’ve taken names from Haskell wherever it made sense too, eg “Prelude”, the Functor hierarchy, <> for the monoid operation, etc, and so I think it would make sense to use the same scheme here. If the PureScript type had never had a row type parameter, what do you think it would have been called? |
Fair point! |
I'm fine donating the name if that's how things go down. The name |
I like the idea of using One concern I have about I'd also consider some other alternatives. A few ideas: |
Oh, I was thinking that Haskell's I do think it would be good to choose names for the default types for synchronous and asynchronous native effects so that it's clear that they are closely related. So I suppose if we're leaving Also, does it make sense to have two distinct types for sync and async effects in other backends? Should we maybe be considering alternative backends in this discussion too? |
If we were to go that route, I'd like to call it |
Wait, sorry, I mean if |
No, I'm saying I would rather not have My vote is for renaming To clarify, I think this is the best option because it a) doesn't lead to confusion with the current |
Ah, I see. Yes, that sounds good to me, although I think it would be good to have a plan for |
Just joking, and in any case I'd like to leave that decision up to the |
I was thinking, I suppose |
How's that? |
Oh, because it would become |
Yeah, exactly. It sounds like we aren't intending to continue providing a type of kind |
@hdgarrood I imagine we'll do the same thing with (or |
Whatever happens with the non-extensible effects and naming, I don't really care. But, I think dropping the rows loses something. It was mentioned in slack that |
What does that achieve over leaving |
My thoughts:
|
Another 2p from me: I think I'm not really a fan of |
and more FFI complexity. I think we need Eff for a simple, sensible FFI. |
Also, I think |
Maybe not related but I do really like standardizing the sync and async effect FFI. (Sync/Eff as a simple thunk and Async/Aff as |
If |
If it's that fast it might be better in the long run to use IO for both, then just convert FFI to IO using specific functions similar to the |
The main issue with this is that |
From https://github.com/purescript/purescript-eff#purescript-eff
I propose |
@gabejohnson I like it, but what about |
@Pauan |
Just a comment to a gradual change: please make it a breaking change (switch to new Eff without rows) and do not mix in the exisiting one. Might be much harder but keeps the clarity of purescript (and the ease of anticipation), which is what everybody likes on the language. |
Closing this, since https://github.com/purescript/purescript-effect |
Discuss.
The text was updated successfully, but these errors were encountered: