[swift-evolution] Variadic generics discussion
LM
laurent.mihalkovic at gmail.com
Wed Jun 1 01:52:18 CDT 2016
On Jun 1, 2016, at 8:26 AM, Brent Royal-Gordon <brent at architechies.com> wrote:
>> 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.
>
Yes, 100% with you there. Just wondering if magic is the only way. You very much said it all when you said 'std lib ... eventually'. Considering it has been described as post-3 there will be time to refine the ideas.
> --
> Brent Royal-Gordon
> Architechies
>
More information about the swift-evolution
mailing list