So having Promises be monads would make them less useful? This is an interesting point.
It seems to confirm the argument that monads are not that useful or pervasive outside of Haskell.
It seems to confirm the argument that monads are not that useful or pervasive outside of Haskell.
But what your describing is the actual value proposition of monad though! It's literally the construct you use to avoid excessive unwraps.
Look at the type signature of bind:
m a -> (a -> m b) -> m b
It returns m b. Not m (m b). Not m (m (m b)).> but they aren’t straightjacketed into the ivory tower “laws” in absolutely every edge case
In other words, you can't abstract over them. If you have libraries that manipulate monads, they will be incompatible or buggy, because they will assume (by design) behaviour that a non-monad will not live up to.
I can assure you that JS libraries work with Promises just fine.