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.
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.
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.
depends on the area you’re working in. it’s a pretty important distinction in embedded software.
Why? I’ve worked as an embedded dev for a few years and nobody in my team cared what it was called.
because making sure offsets are correct come up a lot when you’re memory-mapping IO.
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.