• Kairos@lemmy.today
    link
    fedilink
    arrow-up
    7
    arrow-down
    2
    ·
    1 day ago

    This syntax isn’t actually a problem by itself. Go does this too (no operator overloading)

    • Gremour@lemmy.world
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      edit-2
      22 hours ago

      In Go you can compare structure instances with == (by value). You can also compare pointers (in which case they can be different even if values are equal). You get what you ask for.

      Also, I’ve never needed “Equals” method in Go.