This is not about API, but the source code.
Let’s take Function3
for example:
In the source code of Function3
we have type parameters T1
,T2
and T3
.
The apply method defined as
def apply(v1: T1, v2: T2, v3: T3): R
but not
def apply(t1: T1, t2: T2, t3: T3): R
and the curried method defined as
@annotation.unspecialized def curried: T1 => T2 => T3 => R = {
(x1: T1) => (x2: T2) => (x3: T3) => apply(x1, x2, x3)
}
but not
@annotation.unspecialized def curried: T1 => T2 => T3 => R = {
(t1: T1) => (t2: T2) => (t3: T3) => apply(t1, t2, t3)
}
so does the tupled method is defined as
@annotation.unspecialized def tupled: Tuple3[T1, T2, T3] => R = {
case Tuple3(x1, x2, x3) => apply(x1, x2, x3)
}
but not
@annotation.unspecialized def tupled: Tuple3[T1, T2, T3] => R = {
case ((t1, t2, t3)) => apply(t1, t2, t3)
}
For source code consistency ,I proposal we changed them all to t1...n
but not x1...n
or v1....n
.
An action could be seen here :https://github.com/scala/scala/pull/7427