• [object Object]@lemmy.ca
    link
    fedilink
    arrow-up
    14
    arrow-down
    2
    ·
    5 days ago

    Djikstra was so fucking wrong with this and people who parrot this are so annoying.

    Sure, an offset starts at zero, but an index can very well start at one. Not all arrays represent a physical offset, please stop pretending your inferior zero only indexing is in any way superior.

    Sometimes math is just simpler from one. When you’re translating math to code, one based indexes are usually better.