I think object algebras have huge potential to improve the way complex software is written but I’ve never seen them used in practice. I think one reason why is that the research paper which introduced them is pretty hard to read. This post is my attempt to change that.

I’ve been working on this post off and on for like two years so I’m really excited to share it with people. It is very long. There’s a lot of ground to cover.

  • Olap@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    4 months ago

    This deserves an hour of reading. My first pass is a criticism too sadly. Addition is too trivial, and every example is pure - this needs a rubber meets the road example to really spell out the benefits.

    Philip Wadler story for you though: he taught me first year at uni and his first lecture he rips open his shirt and proclaims himself “Lambda Man!” - Haskell was a fun first semester

    • jnkrtech@programming.devOP
      link
      fedilink
      arrow-up
      1
      ·
      4 months ago

      That’s an understandable criticism. I do plan on writing a more involved example in the future, but this would be a two-hour-read if I had tried to include it. I’m hoping that introducing the basics on a very simple example will be a good stepping stone towards more involved ones.

    • ____@infosec.pub
      link
      fedilink
      arrow-up
      1
      ·
      4 months ago

      I should have marked mine more clearly as a “first pass” from the start.

      Worked with too many hotshot folks to trust future/past humans quite that much.

      Once in a while, I’ve even been that hotshot guy. Definitely not excluding my own “oh that was prod…” adventures when I worry about humans, didn’t mean to come off like I think I might have.

      But interesting, and certainly worth kicking around.

      • jnkrtech@programming.devOP
        link
        fedilink
        arrow-up
        2
        ·
        4 months ago

        I get the concern. I haven’t seen the pattern used in practice in an OO context, so I also can’t say for certain where this breaks down. Something to note, though, is that object algebras in an OOP context are equivalent to the final tagless pattern in an FP context, and it’s not uncommon for entire functional applications to be based around final tagless. This gives me some level of confidence that it would only take a reasonable amount of discipline to build a system based on object algebras.