# Why use an effect system?

**URL:** https://discourse.haskell.org/t/why-use-an-effect-system/10841
**Category:** Learn
**Created:** [November 24, 2024, 6:56pm UTC](https://discourse.haskell.org/t/why-use-an-effect-system/10841 "2024-11-24T18:56:49Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![FPtje](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/fptje/32/3363_2.png) [@FPtje](https://discourse.haskell.org/u/FPtje)
#### Post date: [November 25, 2024, 7:26am UTC](https://discourse.haskell.org/t/why-use-an-effect-system/10841/4 "2024-11-25T07:26:39Z")

</div>

> [@vshabanov](#):
>
> Are there other benefits of using Bluefin over plain `IO` or `ST`?

I think your question is more “why use effects in the first place?”. It’s a valid question, because Bleufin (or effectful for that matter) is something new to learn, and a little more administrative effort. What does one gain? Quite a few things!

Most importantly for me it’s that an effect system pushes me to think about “What are the different ways my program interacts with the world?”. Separating those different ways into different effects is a wonderful exercise.

A second big benefit is that IO doesn’t tell you much. Could be writing files, network requests, database things. With an effect system, every function will tell you what side effects it has with much more granularity. That helps me understand much better what a function actually does.

Effects have a nature of seperating the “what” from the “how”. That means you can have different implementations for the same effect. This typically works really well to set up mocking for tests. E.g. Replace the Database functionality with pretending you updated something and returning a constant value.

---

_[View the full topic](https://discourse.haskell.org/t/why-use-an-effect-system/10841)._
