• xmunk@sh.itjust.works
    link
    fedilink
    arrow-up
    26
    ·
    3 months ago

    Once your pointer definition looks like a censored swear word you’re doing something awful.

    In my entire programming career I’ve used int ** less than a handful of times and I’ve always been borderline about refactoring when I need it.

    • CanadaPlus@lemmy.sdf.org
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      3 months ago

      Okay, but what if you’re dealing with a rather high-dimensional tensor? In some kinds of coding it can happen, and you usually don’t want to sacrifice performance when it does.

      You can also do increasingly elaborate pointer arithmetic, but that seems worse, not better to me.