Hacker News new | past | comments | ask | show | jobs | submit login

Why wouldn't a Monad trait work?

You mean you couldn't express it in Rust, even with HKTs? Or you mean that it wouldn't be useful?




Both. See here for more https://twitter.com/withoutboats/status/1027702538563477505

There have been some people working on these problems, take https://varkor.github.io/blog/2018/11/10/monadic-do-notation... for example. This is why I say "not clear" and not "impossible" or something. We just don't know.


It's basically a research-level problem given the other constraints of Rust. (Which is fine. Trade-offs and all that.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: