• xor@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    38
    arrow-down
    1
    ·
    1 day ago

    It’s nice that this exists these days, but my god is it horrendously unreadable at a glance

    • Ephera@lemmy.ml
      link
      fedilink
      arrow-up
      4
      ·
      4 hours ago

      It makes it look like they’re just adding random noise to avoid colliding with existing syntax. Maybe they can try a UUID next time…

      • flying_gel@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 hour ago

        It makes perfect sense actually. I did write another comment here if you are interested.

        This is how operator overloads were written going back to the initial version of C++ back in 1985. The only new thing is that we can now add = default to get the compiler to generate a default implementation that compares all the member variables for you.