JavaScript Promises as a poor person’s Either Type

Nadeesha Cabral
2 min readOct 17, 2020

I’ve been thinking about elegantly handling exceptions in synchronous Javascript code for a while.

I’m a fan of Either types and Future types. And my views about what’s “right” is heavily influenced by using them in production code-bases.

The Problem

--

--

Nadeesha Cabral

Hi, I’m Nadeesha. I work with computers a lot. I write about software development, and a few other things.