[swift-evolution] Variadic generics discussion

Austin Zheng austinzheng at gmail.com
Tue May 31 13:11:37 CDT 2016

AFAICT compile-time code generation suffers from the C++ templates problem
- my understanding is that if you don't have access to the definition of
the template you can't specialize. A Swift (regular, non-variadic) generic
function can be called with any conforming type without need for
specialization through dynamic dispatch, with specialization still existing
as an optimization. Having the same apply to variadic generics would be a
significant advantage.

On Tue, May 31, 2016 at 11:08 AM, David Sweeris <davesweeris at mac.com> wrote:

> Out of curiosity, why?
> - Dave Sweeris
> On May 31, 2016, at 12:59 PM, Austin Zheng via swift-evolution <
> swift-evolution at swift.org> wrote:
> How so? I'm interested in anything that can get us away from having to
> generating code at compile-time.
> On Tue, May 31, 2016 at 10:04 AM, L. Mihalkovic <
> laurent.mihalkovic at gmail.com> wrote:
>> What's interesting about the code in the manifesto is that it looks very
>> much like "..." is a runtime construct, as opposed to trying the get the
>> compiler to do the heavy lifting.
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160531/203c5a54/attachment.html>

More information about the swift-evolution mailing list