<div dir="ltr">(I should mention that this is all just my personal read on the situation, and shouldn't be construed as trying to stop or induce anyone else from doing anything. Would love to see other proposals on generics, if people want to work on them.)</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 31, 2016 at 1:25 PM, Austin Zheng <span dir="ltr"><<a href="mailto:austinzheng@gmail.com" target="_blank">austinzheng@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have a proposal for #6 in the pipe, but there are actually some subtleties I have to work out (it's not as simple as just slapping a generic type signature on a let constant).<div><br></div><div>I think #5 is just considered a 'bug' and doesn't need a proposal (it might actually be finished already; I saw some commits recently); same with #4. #7 is not very useful without variadic generics (it pretty much exists to allow tuples to conform to protocols, and tuples are inherently variadic).</div><div><br></div><div>I wanted to take a stab at #2. The core team has talked so much about #1 that I'd be surprised if they don't already have an idea as to how they want to do it, plus it's complicated for a number of reasons to get right. In such a case having the community push forward an alternate proposal would just be giving everyone more unneeded work.</div><div><br></div><div>#3 seems semantically straightforward. AFAIK there's nothing a subscript can do that a getter and setter method can't do together, and methods can already be generic. A proposal shouldn't be hard to put together.</div><div><br></div><div>Let me know your thoughts.</div><div><br></div><div>Best,</div><div>Austin</div><div><br></div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 31, 2016 at 1:16 PM, Matthew Johnson <span dir="ltr"><<a href="mailto:matthew@anandabits.com" target="_blank">matthew@anandabits.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On May 31, 2016, at 2:56 PM, Austin Zheng via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:</div><br><div><div dir="ltr">This is pretty much where my thinking about the topic has led me as well. I'll resign this topic to pursue some other, hopefully more relevant work, although anyone who wants to continue the discussion is welcome to.</div></div></blockquote><div><br></div></span><div>Seems reasonable to wait until we can at least evaluate the macro approach properly.</div><div><br></div><div>Are you planning to continue work on generics? FWIW, my top priority list for items without proposals is roughly:</div><div><br></div><div>1. Conditional conformance (<a href="https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#conditional-conformances-" target="_blank">https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#conditional-conformances-</a>)</div><div>2. Parameterized extensions (<a href="https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#parameterized-extensions" target="_blank">https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#parameterized-extensions</a>)</div><div>3. Generic subscripts (<a href="https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#generic-subscripts" target="_blank">https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#generic-subscripts</a>)</div><div>4. Recursive protocol constraints (<a href="https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#nested-generics" target="_blank">https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#nested-generics</a>)</div><div>5. Nested generics (<a href="https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#nested-generics" target="_blank">https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#nested-generics</a>)</div><div>6. Default generic arguments (<a href="https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#default-generic-arguments" target="_blank">https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#default-generic-arguments</a>)</div><div>7. Extensions of structural types (<a href="https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#extensions-of-structural-types" target="_blank">https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#extensions-of-structural-types</a>)</div><div><br></div><div>And this one seems like low hanging fruit:</div><div><br></div><div>Default implementations in protocols (<a href="https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#default-implementations-in-protocols-" target="_blank">https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#default-implementations-in-protocols-</a>)</div><div><br></div><div>How does this compare to your priorities for generics?</div><span><div><br></div><blockquote type="cite"><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 31, 2016 at 12:49 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com" target="_blank">clattner@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On May 31, 2016, at 12:17 PM, L Mihalkovic via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:</div><br><div><div style="word-wrap:break-word"><div>well there is no macro system, and for the moment a clear statement from chris that this is not on the table in the short term. the code in the example looked like run-of-the-mill swift, except for the “…". so that leaves us with swift looking code that would be executed by the compiler, but with nothing particular to tell which parts to and which not. just a thought.</div></div></div></blockquote><div><br></div></span>Lets be clear though: variadic generics are not in scope for Swift 3 either. </div><div><br></div><div>I definitely don’t speak for the rest of the core team, nor have I discussed it with them… but IMO, this whole feature seems like a better fit for a macro system than it does to complicate the generics system. Unlike C++’s template system, our generics system inherently has runtime / dynamic dispatch properties, and I don’t think that shoehorning variadics into it is going to work out well.</div><span><font color="#888888"><div><br></div><div>-Chris</div></font></span><div><br><blockquote type="cite"><div><span><div style="word-wrap:break-word"><div><br></div><br><div><blockquote type="cite"><div>On May 31, 2016, at 7:59 PM, Austin Zheng <<a href="mailto:austinzheng@gmail.com" target="_blank">austinzheng@gmail.com</a>> wrote:</div><br><div><div dir="ltr">How so? I'm interested in anything that can get us away from having to generating code at compile-time.<div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 31, 2016 at 10:04 AM, L. Mihalkovic <span dir="ltr"><<a href="mailto:laurent.mihalkovic@gmail.com" target="_blank">laurent.mihalkovic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><span><div><br></div><div>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.<br></div></span></div></blockquote><div><br></div></div></div></div></div>
</div></blockquote></div><br></div></span><span>_______________________________________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></span></div></blockquote></div><br></div></blockquote></div><br></div>
_______________________________________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></div></blockquote></span></div><br></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>