-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
indices
or indexes
?
#12902
Comments
I'm terribly guilty of using both semi-interchangeably. I think I have some sort of rule in my head, where indices are abstract and indexes are a concrete collection with more than one index, but it drives me batty looking back and seeing a mix. +1 to standardizing on just one or the other. $ ack indexes base | wc -l
99
$ ack indices base | wc -l
75 |
We should stick with "indexes".
Senses 8 and 9 refer to usage in mathematics and the sciences; 5 is the bibliographic sense (book indexes). |
+1 for indices |
I'm surprised it's weighted so heavily towards indices in registered packages: $ ack indexes --type=julia ALL_PACKAGES | wc -l
324
$ ack indices --type=julia ALL_PACKAGES | wc -l
1339 I'd favor |
Given that indices is more the norm for math/sciences/technical meaning, and that crowd has a very high representation among Julians, I'm not surprised by that result in the registered packages (also due to the very international following that Julia has, I suppose). |
Also, some people make a distinction between database indexes, and array indices. Kind of crazy, but it happens. |
Being a non-English speaker by nature indexes is significantly easier for me to notice without a single though that it's about indexing, than indices which requires slight amount of brain work to realize what it's about. |
Down with irregular plurals! |
Flip a coin, and decide. I'll be happy to help change things either direction. |
+1 for indices. It is a bit easier to pronounce. |
In Portuguese ans Spanish (I think) it's indices, so that one is naturally easier for us. |
+1 for array indices as well. Fortran, Matlab, Python, R all seem to use "indices". Note that simple searches do not give clear results, as "indexes" has a second meaning that shouldn't be counted: "the variable |
In matters Julia, I am greatly reluctant to advocate other than @JeffBezanson's sense of appropriateness. with great reluctance (This plural of index quandry is something I have examined deeply, so fwiw) |
@J-Sarnoff's definition makes the most sense to me. |
(Definitions) |
In Sweden we have it nice. Singular and plural of index is the same, it's just "index". +0.1 for indices, (0.1 since I believe my Swedish vote is of little importance). |
+1 for indices |
1 similar comment
+1 for indices |
+1 for indices (I always cringe when I see "indexes") |
Make no mistake, my preference for "indexes" is pure linguistic activism; I don't claim it's more correct according to current standards, but that it should be. |
We can skirt the issue in some cases, particularly for local variables — |
I imagine that the slight preference for "indexes" in Base (98 to 75 by my count) is due to the influence of a certain linguistic activist (and gets multiplied because most occurrences are due to functions having |
It seems there is a majority for This leads to the next question: Should the functions in |
+1 for indices |
Any decision yet? Once a decision is made, at least all the error messages and documentation can be updated in a PR (changes to function names will need separate PRs and deprecations, IMO). |
indices Case Singular Plural |
+1 for indices |
My matrices have indices. Do your matrixes have indexes? |
Two not irrelevant historical facts from my recent research:
Now that |
Oh, and now there is a method with a keyword argument using
so whatever we decide on is guaranteed to break some API. |
In my mind, "indices" is what a matrix or vector has, while a "indexes" is what a database table has if there's more than one index. Perhaps this is a made up distinction. |
@StefanKarpinski It is "a distinction with a difference." |
This issue now appears to be blocking 😄 for #16260. |
👍 to this interpretation |
There seems to be more consensus behind |
Interestingly, we're talking about indices and indexes in base quite a bit more than we were when this issue was opened… but we added them in almost exactly equal number:
In #16251 I get rid of a whole slew of indexes, just barely bringing indices into the lead (97 - 102). The remaining major uses of indexes are: |
It's rather remarkable how much more we're talking about
I think the only things left to do are update a few docstrings and deprecate (and maybe rename) |
What advantage obtains by getting this consistent vocabulary almost consistent within Julia? |
Let's go ahead and change all of them, including the field name. |
Should Julia choose either of the terms
indices
orindexes
as preferred when talking about arrays? From a usability point of view, it is probably desirable to choose one of the terms and stick with it, especially when it comes to name publicly visible functions in the base language or commonly used packages.Currently, looking for either term finds about the same number of occurrences (in both local variables, argument names, and documentation combined). Some other languages (e.g. Fortran, Python) prefer
indices
, database systems seem to preferindexes
. Google tells me that common language prefers "indexes" while math and computer science prefer "indices".The text was updated successfully, but these errors were encountered: