• SorryQuick@lemmy.ca
    link
    fedilink
    arrow-up
    2
    ·
    1 day ago

    That doesn’t really address what you call it. Names only really just exist to get your point across. Inexperienced devs may not know what an offset means (or why we use that), so index does the job. An experience dev knows how it works anyway, so whether you say index or offset won’t matter. By virtue of the common denominator, I simply use index everywhere.

    • lime!@feddit.nu
      link
      fedilink
      arrow-up
      1
      ·
      18 hours ago

      depends on the area you’re working in. it’s a pretty important distinction in embedded software.

      • SorryQuick@lemmy.ca
        link
        fedilink
        arrow-up
        2
        ·
        9 hours ago

        Why? I’ve worked as an embedded dev for a few years and nobody in my team cared what it was called.

        • lime!@feddit.nu
          link
          fedilink
          arrow-up
          1
          ·
          8 hours ago

          because making sure offsets are correct come up a lot when you’re memory-mapping IO.

          • SorryQuick@lemmy.ca
            link
            fedilink
            arrow-up
            2
            ·
            6 hours ago

            Right but whether they’re correct or not doesn’t depend on the name you use. Every programmer worth his name knows arrays start at offset zero even if you don’t call it that.