You are correct that the second subsumes the first. However, the first doesn't actually exist. If you look closer at the docs you'll see the words [use case]
:
abstract def copyToArray(xs: Array[A], start: Int, len: Int): Unit
[use case] Copies elements of this collection to an array.
A [use case]
in the Scala API shows a simplified form of the signature. This gives the "typical" use in a way that isn't so scary to new Scala programmers who might otherwise be confused by the crazy type signatures.
You see the same thing with many other methods, including map
(in which the CanBuildFrom
stuff is hidden):
abstract def map[B](f: (A) ⇒ B): CC[B]
[use case] Builds a new collection by applying a function to all elements of this collection.
def map[B, That](f: (A) ⇒ B)(implicit bf: CanBuildFrom[Traversable[A], B, That]): That
Builds a new collection by applying a function to all elements of this collection.
To read an old post where Martin Odersky discusses the issue, see here.