# What would be the benefit of a \`Monad\` type?

**URL:** <https://internals.rust-lang.org/t/what-would-be-the-benefit-of-a-monad-type/13442>\
**Category:** language design\
**Created:** [November 23, 2020, 10:01pm UTC](https://internals.rust-lang.org/t/what-would-be-the-benefit-of-a-monad-type/13442 "2020-11-23T22:01:44Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![H2CO3](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/h2co3/32/2849_2.png) [@H2CO3](https://internals.rust-lang.org/u/H2CO3)\
**Post date:** [November 24, 2020, 9:03am UTC](https://internals.rust-lang.org/t/what-would-be-the-benefit-of-a-monad-type/13442/4 "2020-11-24T09:03:38Z")

</div>

> [@piegames](#):
>
> But what for?

To offer my $0.02: in Rust, not much.

In pure functional languages, monads are pretty much needed for a handful of use cases for solving very concrete and practical problems. Like, performing I/O, getting through chained fields of types, having syntactic sugar for error handling, etc.

In Rust, which is not constrained by the "thou shalt never mutate anything" rule, these problems have more natural and convenient solutions. And while some of the types and APIs do benefit from a monad-like design and usage pattern, it's a lot less useful to abstract over general monads, because there's not much to generalize (or rather, it doesn't solve more problems than the other features of the language).

Some have facetiously argued in the past that "monads are a solution to a problem you shouldn't have". While I don't agree with such a strong statement, I can see where it's coming from.

---

_[View the full topic](https://internals.rust-lang.org/t/what-would-be-the-benefit-of-a-monad-type/13442)._
