• SpaceNoodle@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    I don’t think I’ve ever explicitly gone four deep. Two is common enough, and three happens on some rare occasions, but four seems like sheer madness.

    • Ephera@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      2 years ago

      Dumb question, but when would you need two deep? Is it when you store a pointer as a field in a struct?

      If so, isn’t that a massive footgun, because the pointer might go invalid at any point? 🫠

      • SpaceNoodle@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        Pointers to arrays or arrays of pointers are common examples.

        Your pointers won’t just magically become invalid. You gotta fuck 'em up first.