DEV Community

Discussion on: Smooth Undefined - Maybe value, maybe not?

Collapse
 
iquardt profile image
Iven Marquardt

The way you encoded Maybe looks like a 1:1 replacement for null. I'd use two distinct value constructors Just/Nothing that create tagged values. But I get your intention to keep things simple.

Collapse
 
hcapucho profile image
João H. Capucho

Hi, Iven.

First, thanks for your comment. Yes, the idea was to keep as simple as possible.

I have a queue of things to write, one of them being the Either monad. In that future article, I will be go into more detail with the types associated to it (Left, Right), because from my perspective in those scenarios they make the end goal clearer.

But will also try to keep as simple as possible to embrace people learning the concepts.