[swift-evolution] Variadic generics discussion
Brent Royal-Gordon
brent at architechies.com
Wed Jun 1 01:26:54 CDT 2016
> Sounds like more compiler magic... rather than trying to reduce it.
Think of it this way: The amount of compiler magic should be at most proportional to the amount of utility granted by that magic. Most of the magic in this design is not directly in service of variadic generics, but rather in service of more general, and more widely useful, features like Collection-like tuples and splatting.
In particular, a lot of the Collection-like tuple stuff—which at least has the largest *surface area* of magic in this proposal—is, in my opinion, *very* likely to be standard-library-implementable eventually, either with regular code or with macros. It's also the most broadly useful part of it; people have asked for this feature to make C buffers more accessible, to implement fixed-size arrays, and for various other purposes. As I said, I actually forgot that we hadn't gotten that through review already.
Personally, I think the gains for each feature I discuss are well worth their costs in magic.
--
Brent Royal-Gordon
Architechies
More information about the swift-evolution
mailing list