Editorial: Consistify re "elements in/of" #2941
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The spec is inconsistent on "element[s] in X" vs "element[s] of X".
In pseudocode, I count 37 "in" vs 229 "of".
So in the first commit, I change all the "in" to "of".
However, I don't entirely like the result. While:
all sound fine to me, "the number of elements of X" sounds odd.
Compare:
Also note that the status quo spec has
So in the second commit, I change "of" to "in" just for "the number of elements of X".
(Alternatively, we could avoid this question by instead using the phrase "the length of X". Currently we only use that for Strings.)
The net effect of the 2 commits is:
I've left it as two commits in case you want to look at the effect of just the first.
Historical note: PR #2152 standardized on "of" for iteration: "For each element foo of X".