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
    A

    Axel Wagner

    blog.merovius.de · Personal blog · on HN since 2016

    Axel Wagner writes about Go, including generics, type sets, error handling, and backward compatibility, plus broader programming language topics.

    Visit blogHN submissions
    Languages & CompilersProgramming
    What HN says

    HN commenters cite it for explaining Go design decisions, such as variance and generics constraints, and for its essay on diminishing returns of static typing.

    Stats for nerds
    29HN people shared it
    33linked in comments
    1Kstory points
    Jul 2025last shared
    2018people per year2025

    Top posts on HN

    1. 1
      Diminishing returns of static typing
      5 people · 443 points · first shared 2017 · 617 comments on HN
    2. 2
      Using Hilbert Curves to 100% Zelda
      1 person · 164 points · first shared 2017 · 61 comments on HN
    3. 3
      Calculating Go type sets is harder than you think
      2 people · 88 points · first shared 2022 · 40 comments on HN
    4. 4
      Scrapping Contracts: a critique of the Go generics proposal
      1 person · 86 points · first shared 2018 · 26 comments on HN
    5. 5
      Persistent datastructures with Go
      3 people · 48 points · first shared 2018 · Discussion on HN
    6. 6
      Backwards compatibility in Go (2015)
      3 people · 47 points · first shared 2017 · 34 comments on HN
    7. 7
      Operator constraints in Go
      1 person · 47 points · first shared 2022 · 18 comments on HN
    8. 8
      Using roughtime as a “cryptographic notary”
      1 person · 42 points · first shared 2018 · 13 comments on HN
    9. 9
      Ext4: Mysterious “No space left on device”-errors due to hash collisions (2013)
      1 person · 15 points · first shared 2022 · Discussion on HN
    10. 10
      My Case for Veganism (2018)
      1 person · 11 points · first shared 2019 · 6 comments on HN

    What HN people wrote when they linked it

    • earthboundkidDec 2020

      Cancellation is a little tricky. If things can cancel at any point, then it's impossible to write safe/correct code. Async has the advantage that the await calls are natural sync points, so it's (probably) safe to cancel there. But historical experience has also shown that people will forget to yield when they should, and it will lead to cooperation problems.

      I think the best approach has to look something like Go's, but perhaps a bit more structured (dynamic scoping[1] might help perhaps with task nurseries[2]). Unless you're writing extremely low level code, you want your language runtime to intercept all syscalls and figure out the async story for you. The language should handle making sure that the M:N mapping works out, no one opens a socket the wrong way etc. Then for you as the program writer, your responsibility is just setting explicit cancellation points as part of the general error handling approach. It's still not perfect, but I think that would be the next evolution from what exists today.

      [1] https://blog.merovius.de/2017/08/14/why-context-value-matters-and-how-to-improve-it.html

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

    • MeroviusJul 2025

      > You need to have something that uses those templates.

      Exactly. That is what I said:

      > because you need to know the actual type arguments used, regardless of what the constraints might say.

      It is because type-checking concept code is NP complete - it is trivial to check that a particular concrete type satisfies constraints, but you can not efficiently prove or disprove that all types which satisfy one constraint also satisfy another. Which you must do to type-check code like that (and give the user a helpful error message such as “this is fundamentally not satisfiable, your constraints are broken”).

      And it’s one of the shortcomings of C++ templates that Go was consciously trying to avoid. Go’s generics are intentionally limited so you can only express constraints for which you can efficiently do such proofs.

      I described the details a while back: https://blog.merovius.de/posts/2024-01-05_constraining_complexity/

    • hellofunkJun 2018

      I'm a fan of this multi-language trend of gradual and optional typing. Static typing has definite benefits, but there are also diminishing returns on productivity as a language becomes more and more statically safe. Often times, type safety is a rabbit hole that can easily turn a language into what some call a "puzzle language," where the efforts to please the compiler become non-intuitive and take long times to figure out. Some of the classes in Swift for example have to adopt a hundred protocols just to compile. Rust is an even more extreme example. You might get extra safety, but at significant development cost.

      Gradual typing in Python is a happy medium that lets the developer decide (to some degree) on the workflow up front. It's a nice compromise for a wide range of work.

      I love this explanation from a few months ago:

      https://blog.merovius.de/2017/09/12/diminishing-returns-of-static-typing.html

    • pansa2Nov 2024

      I'm surprised by the complexity of Go's generic constraints, given the language's focus on simplicity. Things like the difference between "implementing" and "satisfying" a constraint [0], and exceptions around what a constraint can contain [1]:

      > A union (with more than one term) cannot contain the predeclared identifier comparable or interfaces that specify methods, or embed comparable or interfaces that specify methods.

      Is this level of complexity unavoidable when implementing generics (in any language)? If not, could it have been avoided if Go's design had included generics from the start?

      [0] https://stackoverflow.com/questions/77445861/whats-the-difference-between-types-implements-and-types-satisfies

      [1] https://blog.merovius.de/posts/2024-01-05_constraining_complexity/

    • SkyMarshalJun 2021

      >I have never got all these jokes.

      If you mean that literally, this joke is referencing another joke meme in the functional programming community, explained here: https://blog.merovius.de/2018/01/08/monads-are-just-monoids.html

      If you mean, you don't get why people joke about Git being hard, it probably isn't for most professional programmers already accustomed to some kind of source control, just perhaps to anyone new to it.

    • mihaitodorOct 2024

      I recall reading some details around this on https://blog.merovius.de. Maybe it was this article: https://blog.merovius.de/posts/2018-06-03-why-doesnt-go-have-variance-in. Compilation speed plays a big factor when deciding which features are added to Golang and I think they'd have a hard time maintaining the current compilation speed if they remove this limitation.

    Related

    Go Blogblog.golang.org529 people

    Go 2, here we come

    Go Blog
    Company · last shared 2026
    Russ Coxresearch.swtch.com554 people

    Timeline of the xz open source attack

    Russ Cox
    Personal · last shared 2026
    Eli Benderskyeli.thegreenplace.net428 people

    Common Pitfalls in Go Benchmarking

    Eli Bendersky
    Personal · last shared 2026
    Jason Moironjmoiron.net36 people

    Go Performance Tales

    Jason Moiron
    Personal · last shared 2026
    Jeremy Bowersjerf.org78 people

    Functors and Monads for People Who Have Read Too Many “Tutorials”

    Jeremy Bowers
    Personal · last shared 2026
    Graham Jenkinsdarkcoding.net44 people

    Facebook’s code quality problem (2015)

    Graham Jenkins
    Personal · last shared 2025
    Well-Typed Blogwell-typed.com60 people

    Falsify: Hypothesis-Inspired Shrinking for Haskell (2023)

    Well-Typed Blog
    Company · last shared 2026
    C++ Truthscpptruths.blogspot.com17 people

    Covariance and Contravariance in C++ Standard Library

    C++ Truths
    Personal · last shared 2019