You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our indexing API has a mixture of terminology, such as getindex, setindex!, keys and haskey. This issue suggest simplifying some of this, as a continuation of #25057.
Basically, the idea is to replace our "key" terminology with "index" terminology, for consistency and to reduce the number of words used to describe the same thing. After discussion, it seems that "index" makes some sense for arrays and dictionaries, while "key" seems wrong for arrays, so we'd unify these in the direction of "index". We might consider the following:
@StefanKarpinski can you please clarify whether prior discussions count as triage or not (i.e. apply the correct label / milestone). In particular, the above table includes a couple extra (obvious) items for consistency. Thanks!
The text was updated successfully, but these errors were encountered:
Just got reminded of this PR when I updated #27749 .
If we replace "key" by "index" (or vv), we should also consider "element" vs "value" (e.g. eltype vs valtype). I have no opinion either way, but thought it made sense to record that here.
I think we can call this "not planned" given the elapsed time and how breaking it would be
Nowadays there seems to be convention that indices are for AbstractArrays and keys are for collections where things may have names instead of just numbers
Our indexing API has a mixture of terminology, such as
getindex
,setindex!
,keys
andhaskey
. This issue suggest simplifying some of this, as a continuation of #25057.Basically, the idea is to replace our "key" terminology with "index" terminology, for consistency and to reduce the number of words used to describe the same thing. After discussion, it seems that "index" makes some sense for arrays and dictionaries, while "key" seems wrong for arrays, so we'd unify these in the direction of "index". We might consider the following:
getindex
getindex
setindex!
setindex!
keys
indices
(in v1.0 not v0.7??)haskey
hasindex
(#25105)keytype
indextype
KeySet
IndexSet
@StefanKarpinski can you please clarify whether prior discussions count as triage or not (i.e. apply the correct label / milestone). In particular, the above table includes a couple extra (obvious) items for consistency. Thanks!
The text was updated successfully, but these errors were encountered: