"Indices" is the mathematical formulation whereas in publishing they use "indexes" (which is probably why so many people in IT consider "indices" to be more correct than "indexes").
I think that a table index is analogous to an index in a book rather than an exponent in maths, so the publishing variant is the appropriate plural to use in this context.
Furthermore, at least in Oracle, the data dictionary views are called DBA_INDEXES, ALL_INDEXES and USER_INDEXES. It is usually a good idea to employ the same terminology which the domain uses.
Most people don't know that "data" is the plural and "datum" is the singular. How often have you heard "a single data point?"
But then again, even those of us who do know think it sounds goofy and hardly ever say it.
Language is mutable and "datum" might be on its way to becoming archaic by popular decree!
Summarizing answers here and elsewhere:
Both are widely used as the plural of index in English. The Latinate indices is more prevalent in scientific and mathematical contexts, as in the (subscripted) indices of array in a formula. But indexes appears to be on the rise, relatively stronger in publishing ('periodical indexes') and American English.
Some see a value in using indices uniquely for the plural of the noun index, as opposed to the 3rd-person singular present tense indexes of the verb index. ("He indexes all the TPS reports, you can find those indices in the circular file.")
Some perceive a small shading of difference between simple numerical-offset array indices and the more sophisticated data structures of database indexes or full-text indexes. ("The indexes were corrupted because the update code has an off-by-one error in its indices.")
These distinctions are sufficiently subtle that they're likely only maintainable within a tight-knit community of practice which documents their preferences.
Specifically when naming variables in code:
Using indexes
has the often-desirable property that a simple grep search for index
will also find it. When looking for indirect ways in which the same offsets might be referenced, that can be helpful.
target_index = 0
indexes[target] = 0
indexes['target'] = 0
target = len(indexes)
indices
doesn't have this property, so I prefer indexes
in code.
According to webster.com, both "indexes" and "indices" are correct; "indexes" is listed first.
That said, since "indices" was entirely correct to begin with, I don't really think it was appropriate to edit it and replace it with "indexes".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With