Work in progress: 181,232 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #15802

M

Martin Wernstål

Personal blog · m4rw3r.github.ioprogramming

Martin Wernstål writes m4rw3r, a personal blog at m4rw3r.github.io about programming. Since 2016, 5 different Hacker News readers have linked it 5 times, most often “Rust and the Monad trait – Not just higher kinded types”. The last post was in 2016, but the archive is still widely read.

Visit the blog
5mentions?
5HN people?
2016–2021first – last linked?
Links on Hacker News per year · peak 2 in 2016

Too few sampled comments (4) to say how often HN recommends it.?

Why HN links it

HN readers link this blog's posts on Rust's ? operator as a reference for error handling and how it compares to monads. Comments cite it as a source rather than praising it.

Summarised by Claude from a sample of 4 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.

Most-linked posts?

  1. /rust-questionmark-operator
    2 people · 2 mentions · first linked 2016-12-22
  2. Rust and the Monad trait – Not just higher kinded types
    2 people · 2 mentions · first linked 2017-12-18

What Hacker News says?

  1. Rust error handling can be concise thanks to the try! macro, but macros bring their own problems (like making more difficult to write refactoring and static analysis tools). Haskell error handling can be concise thanks to monads, but they need higher kinded types which bring their own share of complexity. The conversation on the "RFC: Stabilize catch_panic", found on Rust's issue tracker, illustrate some unsettled q…

    Comment linking /rust-questionmark-operator/

    on “Visual Studio Code for Go”
  2. Submitted Rust and the Monad trait – Not just higher kinded types as a story · 2 points

    HN discussion
  3. The "?" operator looks like a more specialized, error/success-specific version of monads. Has there been any discussion about generalizing everything into monad-style chaining operators? I see that there is some discussion here [1], including a suggestion to add a Haskell-style "do" block. But that's just one guy's blog post. [1] https://m4rw3r.github.io/rust-questionmark-operator .

    Comment linking /rust-questionmark-operator

    on “Announcing Rust 1.14”
  4. There are strong technical reasons why writing a monad abstraction in Rust is particularly hard[1], and to my knowledge nobody has found a way to do so whilst preserving fairly basic properties like being able to use loops or avoid allocations. Using "?" with appropriate traits is much simpler (important for understandability), more globally applicable (important to be general) and preserves ease of important reason…

    Comment linking /rust-and-monad-trait

    on “Escaping Hell with Monads (2017)”
  5. Right. I think Rust was the first to propose “?” operator as a syntactic sugar to Result and Option monads. (i am not 100% though) ref: https://m4rw3r.github.io/rust-questionmark-operator

    Comment linking /rust-questionmark-operator

    on “Optional Value Handling in Nim”

Search all of HN for m4rw3r.github.io