newsletter

Why everyone is talking about Effect

Effect allows to build complex production Typescript applications that are composable and type safe. This is my take on why you should take a look at Effect, what are the benefits of Effect, and how you can get started with Effect.


Sandro Maglione

Sandro Maglione

Software development

This week Effect exploded 🤯

Everyone took notice, and everyone is talking about it.

Both 😇

and 🫤/🤔

This is exactly why I won’t be touching Effect for a long time. Buying into a new language or even mental model is not just a personal decision. It’s a team/company/ecosystem one. Just like React and TypeScript, I will resist adoption until the network “effects” become so…

Matt Pocock
Matt Pocock
@mattpocockuk

My current mental model, which the maintainers might disagree with, is this: Effect should be treated like a new language, like Elm or ReScript, that happens to use TypeScript syntax. This language has a ton of benefits. Strongly-typed errors. Built-in handling of complex…

364
Reply

I have been using and talking about Effect for a long time now.

Here is my take, and why you should care about this "Effect" thing 👇


Why Effect in the first place?

In the heat of the discussion the main doubt about Effect remains: why?

The simple answer is: "it allows to easily create and maintain complex Typescript applications"

Indeed, that's a bit generic to sell the real value of Effect.

That's my take on "why Effect" 👇

Type safety

It's so awesome when you refactor some code and the complier guides you in all the places in your code that you need to update. That's the power of using types.

Examples:

  • Adding a new error forces you to handle it in all the places where it's introduced (e.g. catchTags)
  • Adding a new services requires you to provide valid implementations where required (i.e. provide)
  • With the Match module and pattern matching you are required to handle all cases

Composable

Dependency injection built in allows to write generic and composable apps.

Define services, and then swap and compose different implementations. This makes testing a breeze, and allows to switch between one solution to another in 1 line of code

You are no more dependent on any framework or library. This is a huge plus 🚀

Best practices

Effect teaches you best practices (regardless of programming language):

The principles that Effect uses and applies force you to better structure and understand your code.

There is more 🤩

Timeless coding principles, practices, and tools that make a difference, regardless of your language or framework, delivered in your inbox every week.

What will happen

The people who tried Effect and understood the "why" are now all-in on it:

This heat will increase more and more in the upcoming months as more people learn about it and start to share more examples.

The Effect team is also hard at work to provide more app examples and improve the docs:

I work on multiple production codebases that are using Effect. I am also going to share more and more examples in the near future:

Meanwhile, you can start from some of the articles I already published about getting started with Effect:


Effect is no more a bet 🔥

Now it's the time to start looking into it. My suggestion is to try it, see by yourself the problem that it solves, and share what you learn along the path.

I am doing the same 💁🏼‍♂️

See you next 👋

Start here.

Timeless coding principles, practices, and tools that make a difference, regardless of your language or framework, delivered in your inbox every week.