<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div><b># What is your evaluation of the proposal?</b><br></div>
<div> </div>
<div>Overall it looks good. I haven't looked at the implementation of AnySequence before, but it sound fairly reasonable.<br></div>
<div> </div>
<div>A couple of minor nits:<br></div>
<div> </div>
<div>1. The proposal motivation says<br></div>
<div> </div>
<blockquote><div>At the moment AnyCollection does not delegate calls to SequenceType protocol methods to the underlying base sequence<br></div>
</blockquote><div> </div>
<div>Presumably that should say AnySequence instead of AnyCollection, since the rest of the proposal talks about AnySequence?<br></div>
<div> </div>
<div>2. One of the added constraints looks like<br></div>
<div> </div>
<pre>S<span class="colour" style="color:rgb(167, 29, 93)">.</span>SubSequence<span class="colour" style="color:rgb(167, 29, 93)">.</span>SubSequence <span class="colour" style="color:rgb(167, 29, 93)">==</span> S<span class="colour" style="color:rgb(167, 29, 93)">.</span>SubSequence<br></pre><div> </div>
<div>with a comment saying that ideally the set of constraints would apply to the SequenceType protocol but that's not currently possible. This makes sense for the other constraints (that SubSequence conforms to SequenceType and has the same element), but this particular constraint, that the subsequence type must have itself as its own subsequence, surprises me a little. I can see why it's needed here (because that's the only way you can guarantee that recursing through SubSequences always finds SequenceTypes with the right element), but ideally we wouldn't actually require it to be the _same_ sequence, just that it is some sequence with the same element type. If we ever change Swift such that these constraints can be expressed on the SequenceType definition itself, then presumably we'll be able to drop this == constraint entirely as the SequenceType protocol itself will ensure that its subsequence is a sequence of the same element type (which will satisfy the need to have it be true after arbitrary levels of recursion).<br></div>
<div> </div>
<div>Given that, I'm inclined to say that we should of course go ahead and have this == constraint here because that's the only way to satisfy the requirement today, but just to note that if SequenceType can learn to express this requirement directly the == constraint will go away as it's perfectly fine then for subsequences of subsequences to be different sequence types.<br></div>
<div> </div>
<div><b># Is the problem being addressed significant enough to warrant a change to Swift?</b></div>
<div> </div>
<div>Yeah. It's a fairly minor change in the scheme of things (should affect very little code, if any), and it fixes a surprising hole in AnySequence.<br></div>
<div> </div>
<div><b># Does this proposal fit well with the feel and direction of Swift?</b></div>
<div> </div>
<div>Yes.</div>
<div> </div>
<div><b># If you have you used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?</b></div>
<div> </div>
<div>Not applicable.<br></div>
<div> </div>
<div><b># How much effort did you put into your review? A glance, a quick reading, or an in-depth study?</b><br></div>
<div> </div>
<div>A reasonably brief reading.<br></div>
<div> </div>
<div>-Kevin Ballard</div>
<div> </div>
<div>On Fri, Dec 18, 2015, at 09:59 AM, Douglas Gregor via swift-evolution wrote:<br></div>
<blockquote type="cite"><div>Yikes, thank you! I have no idea how I managed that. Will re-send...<br></div>
<div> </div>
<div><span style="white-space:pre;"></span>- Doug<br></div>
<div><div> </div>
<div><blockquote type="cite"><div>On Dec 18, 2015, at 9:58 AM, Félix Cloutier <<a href="mailto:felixcca@yahoo.ca">felixcca@yahoo.ca</a>> wrote:<br></div>
<div> </div>
<div><div><span class="font" style="font-family:Helvetica"><span class="size" style="font-size:12px">The URL is right (</span></span><a style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;orphans:auto;text-align:start;text-indent:0px;text-transform:none;white-space:normal;widows:auto;word-spacing:0px;-webkit-text-stroke-width:0px;" href="https://github.com/apple/swift-evolution/blob/master/proposals/0014-constrained-AnySequence.md">https://github.com/apple/swift-evolution/blob/master/proposals/0014-constrained-AnySequence.md</a><span class="font" style="font-family:Helvetica"><span class="size" style="font-size:12px">), but the link points to a different proposal (</span></span><a style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;orphans:auto;text-align:start;text-indent:0px;text-transform:none;white-space:normal;widows:auto;word-spacing:0px;-webkit-text-stroke-width:0px;" href="https://github.com/apple/swift-evolution/blob/master/proposals/0009-require-self-for-accessing-instance-members.md">https://github.com/apple/swift-evolution/blob/master/proposals/0009-require-self-for-accessing-instance-members.md</a><span class="font" style="font-family:Helvetica"><span class="size" style="font-size:12px">). Copy-paste it to access the review.</span></span><br></div>
<div> </div>
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;orphans:auto;text-align:start;text-indent:0px;text-transform:none;white-space:normal;widows:auto;word-spacing:0px;-webkit-text-stroke-width:0px;"><blockquote type="cite"><div>Le 18 déc. 2015 à 12:51:57, Douglas Gregor via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> a écrit :<br></div>
<div> </div>
<div><div style="word-wrap:break-word;-webkit-line-break:after-white-space;"><div>Hello Swift community,<br></div>
<div><div> </div>
<div>The review of “Constraining AnySequence.init” begins now and runs through Monday, December 21st, 2015. The proposal is available here:<br></div>
</div>
<div> </div>
<div><span style="white-space:pre;"></span><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0009-require-self-for-accessing-instance-members.md">https://github.com/apple/swift-evolution/blob/master/proposals/0014-constrained-AnySequence.md</a><br></div>
<div> </div>
<div><div>Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at<br></div>
<div> </div>
<div><span style="white-space:pre;"></span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></div>
<div> </div>
<div>or, if you would like to keep your feedback private, directly to the review manager.<br></div>
<div> </div>
<div>What goes into a review?<br></div>
<div><div> </div>
<div>The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:<br></div>
<div> </div>
<div><span style="white-space:pre;"></span>* What is your evaluation of the proposal?<br></div>
<div><span style="white-space:pre;"></span>* Is the problem being addressed significant enough to warrant a change to Swift?<br></div>
<div><span style="white-space:pre;"></span>* Does this proposal fit well with the feel and direction of Swift?<br></div>
<div><span style="white-space:pre;"></span>* If you have you used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?<br></div>
<div><span style="white-space:pre;"></span>* How much effort did you put into your review? A glance, a quick reading, or an in-depth study?<br></div>
<div> </div>
</div>
<div>More information about the Swift evolution process is available at<br></div>
<div> </div>
<div><span style="white-space:pre;"></span><a href="https://github.com/apple/swift-evolution/blob/master/process.md">https://github.com/apple/swift-evolution/blob/master/process.md</a><br></div>
<div> </div>
<div><span style="white-space:pre;"></span>Cheers,<br></div>
<div><span style="white-space:pre;"></span>Doug Gregor<br></div>
<div><span style="white-space:pre;"></span>Review Manager<br></div>
</div>
<div><img style="height:1px !important;width:1px !important;border-top-width:0px !important;border-right-width:0px !important;border-bottom-width:0px !important;border-left-width:0px !important;margin-top:0px !important;margin-right:0px !important;margin-bottom:0px !important;margin-left:0px !important;padding-top:0px !important;padding-right:0px !important;padding-bottom:0px !important;padding-left:0px !important;" border="0" height="1" width="1" alt="" src="https://www.fastmailusercontent.com/proxy/ea1657ece2016125b07a2c4d3ecbf7756dd17f19ec80b7a61dd69782fda4fb12/8647470737a3f2f25723030323431303e23647e23756e64676279646e2e65647f27766f2f60756e6f35707e6d396259433265684455633558795148445c66533c6143383a794056684d486975725a77645d674b46563b643133637077493a535457303968733d6649317d22364a79345174757256393f6e603e4c6278525539615f627e675a74727d22324d2236477776796577545675736d2236473471573876745b44626277686d223248705d4648393a774a7c4071603668585e4b61567a523a77713b4f4748673c6d41615d22324975484d405c6261417e65523257464f61733c6369627748437367643e616672497233656447564d4e64744b4b40786c4a5962637a78627d6a493241385778427433554b407c486b6867476d223245654968544d223247695d23344/open"><br></div>
</div>
<div>_______________________________________________<br></div>
<div>swift-evolution mailing list<br></div>
<div><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br></div>
<div><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></div>
</div>
</blockquote></div>
</div>
</blockquote></div>
</div>
<div><img style="height:1px !important;width:1px !important;border-top-width:0px !important;border-right-width:0px !important;border-bottom-width:0px !important;border-left-width:0px !important;margin-top:0px !important;margin-bottom:0px !important;margin-right:0px !important;margin-left:0px !important;padding-top:0px !important;padding-bottom:0px !important;padding-right:0px !important;padding-left:0px !important;" border="0" height="1" width="1" alt="" src="https://www.fastmailusercontent.com/proxy/b923be7ec9505212dd30c4776cea09fecd9cc53e11a2118ce667f603b6d8370e/8647470737a3f2f25723030323431303e23647e23756e64676279646e2e65647f27766f2f60756e6f35707e6d3148765176786c673171614a7d2236454230345272776e4854587d4763415353545d4374485433756534605c46717a717963377652486841573f40324b486439667841616451457b6f6955543157467e6232785a665334594b4053713c453858713b696f437c453b4d6143597d22324a45614d22364c607a656d67325d223241685356337077457a6d6d2236413f6037473851676a68456f617a5d6b4949474f60784d2232425144416d2236427838594339624e41665977385476393b4e436b6d223240713e464554426f433857326432466d46345a5e4d446973624d22364332697469456151777d23344d23344/open"><br></div>
<div><u>_______________________________________________</u><br></div>
<div>swift-evolution mailing list<br></div>
<div><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br></div>
<div><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></div>
</blockquote><div> </div>
</body>
</html>