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
{{ message }}
This repository was archived by the owner on Dec 22, 2021. It is now read-only.
So the goal here would be to get rid of unwanted inherited methods, such as the overload of map that works without a ClassTag. Example:
scala> val a = Array("a", "b").map(_.toUpperCase)
a: Array[String] = Array(A, B)
scala> val b = Array("a", "b").map(_.toUpperCase) : Iterable[String]
b: Iterable[String] = Vector(A, B)
scala> a : Iterable[String]
res16: Iterable[String] = WrappedArray(A, B)
But if ArrayOps no longer extends IterableOps, all the inherited operations that would work fine have to be re-implemented. There's no parent trait that would enforce the same interface - a problem that we already have between Iterator and IterableOps (#465).
@julienrf you looked at having parent traits that would group operations by their kind (reducing, transforming, self-transforming)? Is it out of the question?
I think we could probably have a parent trait for reducing operations, because unlike operations that return C or CC[?], there is no need for taking a type parameter (and thus no need to refine it at each level of the hierarchy).
No description provided.
The text was updated successfully, but these errors were encountered: