Closed julienrf closed 6 years ago
I agree that Seq
is redundant in principle but Indexed
wouldn't make a good name to replace IndexedSeq
. Since IndexedSeqOps
is the ops trait for IndexedSeq
, it should be called IndexedSeqOps
and not IndexedOps
. This is consistent with other ops traits.
I have a slight preference for IndexedView
over IndexedSeqView
because Seq
is redundant and unimportant for the view. OTOH, you get a MapView
from a Map
and a SeqView
from a Seq
so it makes sense that you get an IndexedSeqView
from an IndexedSeq
.
I'd suggest favoring consistency/regularity here. One less thing to remember.
For frequently used names, sometimes brevity can win, but this isn't going to be a frequently used name. In most uses, the type will be inferred and not appear in source.
As I mentioned in the comment, I would as soon change
IndexedSeqOps
toIndexedOps
; I don't believe there's any other sensible way to get indexing (especially since "Indexed" doesn't just mean that you can find an index--you can do that withLinearSeq
andSortedSet
and stuff too--it really means that indexing is efficient and natural).