• nous@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    19 days ago

    So, why are go interfaces anything to do with clean code? The article never mentions this at all only goes over interfaces in a basic way…

    • orclev@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      19 days ago

      Basically because Go’s type system is garbage and interfaces are the one hammer it gives you for solving all problems. They’re literally the only way to do polymorphism in Go.