technicated
(Andrea Tomarelli)
March 13, 2020, 9:16pm
125
I have an update!
In this round I rollbacked the idea of VGs being solely dynamic and restored their static-ness, but I retained the Collection
interface at the value level. Please note that the preamble of the document is not up-to-date, only the "Detailed Design" section is.
I tried to be more specific, without going too deep into it, about VG's representation in the compiler and in the type system.
I feel this time we have something more interesting to talk about!
#lovingswift
# Variadic Generics
* Proposal: [SE-NNNN](https://github.com/apple/swift-evolution/blob/master/proposals/NNNN-name.md)
* Author(s): Andrea Tomarelli ([technicated](https://forums.swift.org/u/technicated/summary))
* Status: **[Awaiting review](#rationale)**
* Review manager: TBD
## Introduction
<!--- 1 2 3 4 5 6 7 --->
<!---67890123456789012345678901234567890123456789012345678901234567890123456--->
Variadic Generics is a feature listed in the [Generics Manifesto](https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md) document as one of the major features that needs to be implemented to "complete" generics. It's also a feature that has come up in various threads on the [Swift Forums](https://forums.swift.org), like for example (in no particular order) in [[1]](https://forums.swift.org/t/emulating-variadic-generics-in-swift/20046), [[2]](https://forums.swift.org/t/map-sorting/21421/12), [[3]](https://forums.swift.org/t/variadic-generics/20320), [[4]](https://forums.swift.org/t/implementing-expressiblebytupleliteral-how-hard/21169), [[5]](https://forums.swift.org/t/pitch-function-builders/25167).
This document is kind of a follow up to a [previous one](https://github.com/austinzheng/swift-evolution/blob/az-variadic-generics/proposals/XXXX-variadic-generics.md) by [Austin Zheng](https://forums.swift.org/u/Austin) - "kind of" because I've read the document, but not too in-depth - and this was intentional. I've never worked too much with variadic generics in my programming life and I wanted to start "fresh" and as unbiased as possible on the topic to see if I could come up with new or interesting ideas, but it's also possible that this document ends up sharing a lot of similarities with Austin's! The information contained in the mentioned document and collected on the Swift Forums are going to influence what's presented there.
Swift-evolution thread: [Variadic Generics](https://forums.swift.org/t/variadic-generics/20320)
## Motivation
<!--- 1 2 3 4 5 6 7 --->
<!---67890123456789012345678901234567890123456789012345678901234567890123456--->
This file has been truncated. show original
12 Likes