Effect vs Eff

169 views
Skip to first unread message

rvdalen

unread,
May 24, 2018, 3:59:43 PM5/24/18
to purescript
Hi,

I am seeing some things about an `Effect` type that is being introduced.
Are we moving away from `Eff ()`?
Will `Eff` still be kept around when you want finer grained control of effects?

Can someone just give a short description of what the intention is here with the new Effect type?

Regards
--Rouan

Christoph Hegemann

unread,
May 25, 2018, 6:34:32 AM5/25/18
to purescript

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.

rvdalen

unread,
May 26, 2018, 4:40:34 AM5/26/18
to purescript
Hi Christoph,

Thanks for the reply.
I read the thread.

So if I understand correctly, Purescript will now have both a simple `Effect` type (without the effect rows) and
the `Eff` extensible effects types and we can choose which one we want to use?

Regards
--Rouan

Alex Berg

unread,
Jun 1, 2018, 7:18:10 PM6/1/18
to purescript
Right, you can opt-in to use the phantom typed effects with effect rows (Eff), but the community's core libraries will use the one without effect rows (Effect).

There is also the purescript-run library which provides a more "proper" implementation of extensible effects, which you might be interested in.

rvdalen

unread,
Jun 5, 2018, 7:14:10 AM6/5/18
to purescript
Thanks Alex,

I have successfully switched over my code base to purescript 0.12.0 :)

When you say "proper" can you give a short explanation of why `purescript-run` is more proper than `Eff`?

Regards
--Rouan
Reply all
Reply to author
Forward
0 new messages