Hacker News new | ask | show | jobs
by ninly 2021 days ago
'indexes' has been a just-fine variant of the plural for a very long time -- actually it's the first one listed in Merriam-Webster, so probably the more common variant, though I haven't dug into other references. That said, you're correct that the more common or preferred variant will depend somewhat on the culture/community/industry. The house style guides in finance probably tend toward 'indexes' -- in part because an index is a branded product they produce, so consistency is important -- while software/tech companies (or at least people in them) may tend prefer 'indices'.
2 comments

I will say that, at least for me, indices and indexes aren’t the same word and mean two different things. This has made me realize that I’ve just naturally made this distinction without really knowing it.

* In a loop i,j,k are the indices. Matrices have indices too.

* Databases have indexes. The things at the back of books are indexes.

Indices are things that represent a position in something. Indexes are the things — the literal “objects” or mappings or trackers.

I dunno why, but I typically use “indexes” when I talk about a set of lookup tables (database indexes) and “indices” when talking about positions within indexes (indices of arrays)