3 ms·
Detailed rationale is in the Swift Evolution proposal (https://github.com/apple/swift-evolution/blob/main/proposals/0393-parameter-packs.md https://github.com/a
by Someone 3y ago
Detailed rationale is in the Swift Evolution proposal (https://github.com/apple/swift-evolution/blob/main/proposals/0393-parameter-packs.md https://github.com/apple/swift-evolution/blob/main/proposals...)
This also isn’t a problem specific to Swift. Many strongly typed languages run into it.
Examples:
- C# (https://learn.microsoft.com/en-us/dotnet/api/system.tuple-8?view=net-8.0 https://learn.microsoft.com/en-us/dotnet/api/system.tuple-8?...):
public class Tuple<T1,T2,T3,T4,T5,T6,T7,TRest>
- Scala (https://www.scala-lang.org/api/2.13.6/scala/Function22.html https://www.scala-lang.org/api/2.13.6/scala/Function22.html):
trait Function22[-T1, -T2, -T3, -T4, -T5, -T6,
-T7, -T8, -T9, -T10, -T11, -T12,
-T13, -T14, -T15, -T16, -T17, -T18,
-T19, -T20, -T21, -T22, +R] extends AnyRef
- Java (https://www.javatuples.org/index.html https://www.javatuples.org/index.html; third party)
- halfmatthalfcat 3y agoAnd thus Shapeless (https://github.com/milessabin/shapeless https://github.com/milessabin/shapeless) was born.