I\'m a bit confused in terms of those 2 collections.
I understand that Scala\'s Array calls Java API. In such a case, what\'s the role of a Wrapped Array (and its perfor
WrappedArray
wraps an Array
to give it extra functionality. It also have a bunch of types while array extends only serializable and cloneable, This allows an array to be wrapped so it can be used in places where some generic collection type like Seq
is required.
Also notable is ArrayOps
Which is similar to WrappedArray
in that it enriches an Array with extra operations. The difference is that Operations inArrayOps
return a regular Array
while operations from WrappedArray
return a WrappedArray
ArrayOps
has priority over WrappedArray
so it will be used unless one of the types provided by WrappedArray
is needed.