Proper terminology, should I say indexes or indices?

20,171

Solution 1

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!

Solution 2

"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.

Solution 3

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 & enforces their preferences, as if in some local & authoritative style guide.

Specifically when naming variables in code:

Using indexes has the often-desirable property that a simple grep search for index will also find that pluralization. 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 to use indexes in code.

Solution 4

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".

Solution 5

How about a reverse answer:

Too many people stubbornly (or maybe pendantically, or ignorantly?) insist on using the word "Octopi." "Octopus" originates from Greek, so the whole "us to i" for plurals paradigm doesn't exist. Some folks will even correct you if you say "octopuses," which is the correct English plural.

Not to judge, but I notice the folks who say 'octopi' are generally the same ones who insist on 'datum' and 'indeces' ;)

Share:
20,171

Related videos on Youtube

Raj More
Author by

Raj More

Vexing Conundrums? We can figure it out together.

Updated on February 13, 2022

Comments

  • Raj More
    Raj More about 2 years

    I had a question about indices on a table and I put it up on Stack Overflow. I got my answer, but someone changed the word indices to say indexes.

    We know that the plural of Index is Indices, but we also know that almost everybody prefers the "wrong" word.

    What are some other "wrong" terms like this that really shouldn't be, but are overtaking their "correct" counterparts?

    • Steve Jessop
      Steve Jessop over 14 years
      For a while at one company, some of us tried using "mutices". Didn't really catch on, perhaps because we didn't have the guts to do it in documentation, but I feel the effort was worthwhile ;-)
    • Tunaki
      Tunaki over 8 years
      I'm voting to close this question as off-topic because this is not a programming question but an English question
    • Rob
      Rob over 8 years
      The answer is Indicies.
  • DevSolar
    DevSolar over 14 years
    Adding to the confusion, for Germans like me, is that "data" is commonly used here, and "datum" is just as obscure as in anglophonic countries - but "datum" also means "date" in German...
  • Jim
    Jim over 14 years
  • 1800 INFORMATION
    1800 INFORMATION over 14 years
    I thought that "anecdote" was singular, and "data" was plural
  • John Rose
    John Rose over 14 years
    DevSolar and hacker, that is interesting to know. Thank you for posting that.
  • Marius
    Marius over 14 years
    Actually its octopodes. A good discussion on this over at XKCD: forums.xkcd.com/viewtopic.php?f=2&t=611
  • anschauung
    anschauung over 14 years
    It's octopodes if you happen to be speaking Greek. It's octopuses if you're speaking English.
  • anschauung
    anschauung over 14 years
    Now, if you're planning on going whole hog and applying the appropriate case (u.nu/5xh53) you could make a stronger argument for using 'octopodes' instead of 'octopuses.' 'Octopodes' on it's own is just pedantic.
  • Steve Jessop
    Steve Jessop over 14 years
    "Index" in programming can also mean an array index, which is precisely the mathematical use rather than the publishing one. Interesting point, though, perhaps for full pedantry mode we should be demanding always "database indexes" but "array indices" :-)
  • APC
    APC over 14 years
    The OQ did specifically mention "indices on a table" so I think my point stands. But if I ever come across an array with more than one index I shall strive to use "indices" when discussing it ;-)
  • DanM
    DanM over 6 years
    actually "data point" is perfectly valid; it's an alternate way of writing "point of data". As in, "data" is the composition of the "point". "Datum point" would be redundant and weird.
  • cambunctious
    cambunctious almost 6 years
    What is "the kilobyte/megabyte/gigabyte discussion"? Those words cannot mean the same thing like indexes and indices can.
  • JG in SD
    JG in SD over 3 years
    @cambunctious that would likely be the difference between kibibyte/mebibyte/gibibyte vs kilobyte/megabyte/gigabyte. The scientific prefixes kilo-/mega-/giga-/etc being defined 10^3/10^6/10^9/... vs the binary prefixes of kibi-/mebi-/gibi-/etc being defined as 2^10/2^20/2^30/... The debate is seen between OS makers historically used kilo-/etc with the 2^* definitions while hard drive makers have been using 10^* definitions. Which is why your 500GB hard drive registers as 465GB to the OS. en.wikipedia.org/wiki/Binary_prefix
  • Roshambo
    Roshambo almost 3 years
    This is an absolutely wonderful answer.
  • moger777
    moger777 over 2 years
  • Muhammad Yasirroni
    Muhammad Yasirroni about 2 years
    TLDR: In variable naming inside of code, if you use indexes, searching index will find both indexes and index. Whereas indices doesn't have this property.