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
    R

    Runar Bjarnason

    blog.higher-order.com · Personal blog · on HN since 2013

    Runar Bjarnason writes about functional programming, Scala, type theory and language design, including pattern matching and expressiveness tradeoffs.

    Visit blogHN submissions
    Languages & CompilersProgramming
    What HN says

    HN commenters link it for pattern matching in Java via Church encoding and for "Maximally Powerful, Minimally Useful" on expressiveness versus analyzability.

    Stats for nerds
    21HN people shared it
    16linked in comments
    189story points
    Nov 2017last shared
    2014people per year2017

    Top posts on HN

    1. 1
      Maximally Powerful, Minimally Useful
      3 people · 80 points · first shared 2014 · 24 comments on HN
    2. 2
      Objects, Identity, and Concept-formation (2008)
      3 people · 34 points · first shared 2014 · 36 comments on HN
    3. 3
      Easy Performance Wins with Scalaz
      2 people · 34 points · first shared 2015 · 4 comments on HN
    4. 4
      A better reading list with Mathematica
      1 person · 23 points · first shared 2015 · 8 comments on HN
    5. 5
      A Scala Comonad Tutorial
      1 person · 4 points · first shared 2016 · Discussion on HN
    6. 6
      Structural Pattern Matching in Java
      3 people · 3 points · first shared 2017 · Discussion on HN
    7. 7
      A Critique of Impure Reason
      2 people · 3 points · first shared 2018 · Discussion on HN
    8. 8
      Functional Programming (in Scala) – Monoid Morphisms, Products, and Coproducts
      1 person · 2 points · first shared 2014 · Discussion on HN
    9. 9
      A Comonad of Graph Decompositions
      1 person · 2 points · first shared 2016 · Discussion on HN
    10. 10
      Free monads and the Yoneda lemma
      1 person · 1 points · first shared 2013 · Discussion on HN

    What HN people wrote when they linked it

    • charlyslNov 2017

      "other functional style syntaxes like pattern matching are being introduced in many of them"

      The Interpreter and its dual the Visitor GOF pattern have made what amounts to pattern matching possible in OO languages for a few decades now [1].

      The whole point of these patterns is to write recursive functions following recursive data types, which is one of the main use cases for pattern matching (ok, more generally these are used to break data structures apart).

      In particular, if you look at an example of the Visitor pattern, you will see that it has exactly the same structure as a recursive function that separates cases in a FP language [2]

      Here is a detailed explanation of how to do it [3]; it is the "little language" technique (which I suspect is the reason why it is called the Interpreter).

      [1] https://eli.thegreenplace.net/2016/the-expression-problem-and-its-solutions/

      [2] http://blog.higher-order.com/blog/2009/08/21/structural-pattern-matching-in-java/

      [3] https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-005-elements-of-software-construction-fall-2008/lecture-notes/MIT6_005f08_lec15.pdf

    • xwowsersxOct 2014

      From the looks of it, the author of these slides has written very little Scala. Take slide #7, for example, where he writes def bar() = { "1" } when def bar = "1" is perfectly sufficient. Ironically, I may very well be pointing out the bad parts of scala (i.e. that () is simply a convention for indicating Unit or side-effecting functions, but its just convention and not enforced by the type system in any way). Notwithstanding that, I don't think someone who has written very little Scala is in a great position to offer a reasonable critique.

      This is a longer discussion, but in the very first slide he points to the object-orientation as a plus. In my opinion, he's already wrong. "There is no such thing as Object-Oriented programming." See: http://blog.higher-order.com/blog/2008/12/04/no-such-thing/

    • telDec 2014

      This is an instance of the "Maximally Powerful, Minimally Useful" principle from a few days ago [0]. Because the language being described is sufficiently minimal it has multiple valid, meaningful interpretations including the direct "just execute it" interpretation, a theoretical "compile this to some kind of other language and interpret it there", and, most interestingly, interpret these relations as a linear algebra problem.

      It should be quite clear that a more "powerful" language would not admit this last meaning/interpretation/denotation.

      [0] http://blog.higher-order.com/blog/2014/12/21/maximally-powerful/

    • platzNov 2015

      It’s well known that there is a trade-off in language and systems design between expressiveness and analyzability. That is, the more expressive a language or system is, the less we can reason about it, and vice versa. The more capable the system, the less comprehensible it is.

      http://blog.higher-order.com/blog/2014/12/21/maximally-powerful/

    • rdnettoMar 2017

      It's worth noting you can implement something similar in OOP languages using Church encoding: http://blog.higher-order.com/blog/2009/08/21/structural-pattern-matching-in-java/

    Related

    Apocalispapocalisp.wordpress.com23 people

    Imperative vs Functional Programming

    Apocalisp
    Personal · last shared 2025
    Aditya Bhargavaadit.io68 people

    Functors, applicatives, and monads in pictures

    Aditya Bhargava
    Personal · last shared 2025
    FP Complete Blogfpcomplete.com201 people

    Monads and GATs in Nightly Rust

    FP Complete Blog
    Company · last shared 2025
    Oleg Kiselyovokmij.org251 people

    How the OCaml type checker works (2022)

    Oleg Kiselyov
    Personal · last shared 2026
    Well-Typed Blogwell-typed.com60 people

    Falsify: Hypothesis-Inspired Shrinking for Haskell (2023)

    Well-Typed Blog
    Company · last shared 2026
    Justin Leblog.jle.im36 people

    Typesafe Neural Networks in Haskell with Dependent Types

    Justin Le
    Personal · last shared 2026
    Luke Palmerlukepalmer.wordpress.com35 people

    IDE WTF

    Luke Palmer
    Personal · last shared 2020
    Ranjit Jhalagoto.ucsd.edu/~rjhala19 people

    Pointers Gone Wild

    Ranjit Jhala
    Personal · last shared 2025