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 <[email protected]> wrote: > Out of curiosity, why? > > - Dave Sweeris > > On May 31, 2016, at 12:59 PM, Austin Zheng via swift-evolution < > [email protected]> 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 < > [email protected]> 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 > [email protected] > https://lists.swift.org/mailman/listinfo/swift-evolution > > >
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
