• pivot_root@lemmy.world
      link
      fedilink
      arrow-up
      37
      ·
      10 months ago

      Blasphemy! Unions are just algebraic data types without any guardrails. If the programmer misuses them, that’s their own fault for b$:, 9^\⊂ƒ~>[→ZzF™×#
      Segmentation fault (core dumped)

      • Rednax@lemmy.world
        link
        fedilink
        arrow-up
        23
        ·
        10 months ago

        My C++ teacher taught me to be against unions. He made everything class based instead.

        • pivot_root@lemmy.world
          link
          fedilink
          arrow-up
          11
          ·
          edit-2
          10 months ago

          How reckless, encouraging inheritance like that. My personal demon college tutor instructed me on the ways of Malbolge. In the end, life is just a list of self-modifying instructions.