Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    Y

    Yoshua Wuyts

    blog.yoshuawuyts.com · Personal blog · on HN since 2019

    Yoshua Wuyts, a Rust async working group member, writes about async Rust, error handling, effects, and language design ideas.

    Visit blogRSSHN submissions
    Languages & CompilersProgramming
    What HN says

    Commenters discuss its Rust error handling overview and async posts, debating Rust's many error libraries versus Go's convention, and what async is for.

    Stats for nerds
    65HN people shared it
    109linked in comments
    1.5Kstory points
    Nov 2025last shared
    2020people per year2025

    Top posts on HN

    1. 1
      State Machines in Rust
      2 people · 301 points · first shared 2020 · 112 comments on HN
    2. 2
      Overview of Rust error handling libraries
      6 people · 224 points · first shared 2019 · 79 comments on HN
    3. 3
      Asynchronous Programming in Rust
      2 people · 153 points · first shared 2019 · 16 comments on HN
    4. 4
      Extending Rust's Effect System
      4 people · 151 points · first shared 2024 · 24 comments on HN
    5. 5
      Async Cancellation
      3 people · 123 points · first shared 2021 · 40 comments on HN
    6. 6
      Nesting Allocators (2023)
      1 person · 99 points · first shared 2024 · 11 comments on HN
    7. 7
      Parallel-Stream
      2 people · 80 points · first shared 2020 · 9 comments on HN
    8. 8
      State Machines II
      2 people · 72 points · first shared 2022 · 18 comments on HN
    9. 9
      Async Overloading
      3 people · 61 points · first shared 2021 · 48 comments on HN
    10. 10
      Why Async Rust?
      6 people · 20 points · first shared 2022 · 1 comments on HN

    What HN people wrote when they linked it

    • throwaway894345Apr 2021

      > Not sure what's meant by this; Rust has a standardized Result type, with dedicated syntax for early-returning errors and type checks that make sure you handle them (or at least explicitly ignore them). Go, on the other hand, has a shaky error story and from what I've heard it's a constant problem due to enforcement-by-convention.

      You may not like Go's convention (indeed, I don't love it although I think it works fine in practice), but the only error handling mechanism in Go is `if err != nil { ... }`. On the other hand Rust has many. This is not incompatible with your observation of "a standardized Result type". Here is a survey of the error handling landscape circa 2019: https://blog.yoshuawuyts.com/error-handling-survey/

      > Not really sure what this means either... the owner of a value generally falls out naturally from how you're trying to use it. It's not really an either/or option

      Or you have code which clones gratuitously out of convenience, often because some API unnecessarily asks for ownership of its arguments. Cloning is often just easier than battling the borrow checker, so in the real world with its deadlines, we tend to see a lot of clones because it's more convenient and performance is rarely a concern.

      > I've seen generics make TypeScript codebases impenetrable, and I think there's a decent case to be made for not having them at all.

      In fairness to TypeScript, I suspect much of this 'impenetrability' is because type annotations were added to existing…

    • solidsnack9000Feb 2025

      I don't think a good conversation can be had if we start by arguing about whether or not "rust's strategy has to be the only way to achieve memory safety".

      There are other ways to achieve memory safety. Java's strategy is definitely a valid one; it's just not as suitable for systems programming. The strength of Rust's approach ultimately stems from its basis in affine types -- it is a general purpose and relatively rigorous (though not perfect, see https://blog.yoshuawuyts.com/linearity-and-control/) approach to managing resources.

      One implication of this is that a point you raised in a message above this one, that "rust's default heap allocation can't be trivially used", actually doesn't connect. All variables in Rust -- stack allocated, allocated on the heap, allocated using a custom allocator like the one in Postgres extensions -- benefit from affine typing.

    • vlovich123Oct 2024

      It’s hard to say. If you want to use green threads, you may want to look at the may crate [1]. The reason Rust prioritized stackless async just like C++ did is that it fits better the systems programming needs (i.e. it’s syntactic sugar for a state machine you could hand implement) while not preventing things like stackful coroutines.

      If Rust manages to solve the coloring problem of async (e.g. by adopting effect systems [2] or alternatives), then stackful and stackless coroutines syntactic sugar could conceivably exist within the std language (perhaps leaving out stackless on nostd).

      The reason you don’t see both stackless and stackful coroutines in a single language like Rust is the coloring problem is made 50% worse.

      [1] https://crates.io/crates/may

      [2] https://blog.yoshuawuyts.com/extending-rusts-effect-system/

    • sizediterableOct 2021

      > any blocking operation (a method where Ruby interpreter waits) is compatible with Async and will work asynchronously within Async code block with Ruby 3.0 and later.

      That's pretty magical. Does this mean it would be possible to implement structured concurrency [0], but without the function coloring problem?

      Regardless, I think I prefer how this looks from a code read/writeability perspective compared to Zig's or Swift's (and potentially future Rust's [2]) approaches.

      [0] https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful

      [1] https://kristoff.it/blog/zig-colorblind-async-await/

      [2] https://blog.yoshuawuyts.com/async-overloading/

    • mbStavolaJul 2023

      I have good news for you then-- there already is some experimental[0] work towards this, under the name of "pattern types" (although I believe it's on pause at the moment). The idea seems to be to pull some of the pattern semantics into the type system, allowing for more than just range types, based on a series of blog posts[1] by the author of the PR. Additionally, Yoshua Wuyts has another blog post[2] which gives a decent intro on the concept and what it could be used for down the line.

      [1]: https://github.com/rust-lang/rust/pull/107606
      [2]: https://cohost.org/oli-obk/post/165584-ranged-integers-via
      [3]: https://blog.yoshuawuyts.com/pattern-extensions/#pattern-types

    • adkadskhjApr 2021

      > You may not like Go's convention (indeed, I don't love it although I think it works fine in practice), but the only error handling mechanism in Go is `if err != nil { ... }`. On the other hand Rust has many. This is not incompatible with your observation of "a standardized Result type". Here is a survey of the error handling landscape circa 2019: https://blog.yoshuawuyts.com/error-handling-survey/

      By this definition, Go has many too. Go has lots of libraries to wrap error types, combine errors, preserve error data, etcetc.

      Errors are one of the more similar things between Rust and Go, honestly.

    Related

    Niko Matsakissmallcultfollowing.com221 people

    Towards a Rust Foundation

    Niko Matsakis
    Personal · last shared 2026
    without.boatswithout.boats80 people

    Pin

    without.boats
    Personal · last shared 2026
    Rust Blogblog.rust-lang.org533 people

    Announcing Rust 1.0

    Rust Blog
    Company · last shared 2026
    Ralf Jungralfj.de99 people

    There is no memory safety without thread safety

    Ralf Jung
    Personal · last shared 2026
    matkladmatklad.github.io237 people

    Architecture.md

    matklad
    Personal · last shared 2026
    James Coglanblog.jcoglan.com93 people

    The Myers diff algorithm: part 1

    James Coglan
    Personal · last shared 2026
    Aria Beingessnerfaultlore.com92 people

    C isn't a programming language anymore

    Aria Beingessner
    Personal · last shared 2026
    Sean McArthurseanmonstar.com31 people

    Intel - nodejs logging that plays nice with console.log

    Sean McArthur
    Personal · last shared 2025