Sorry, it's been a while but I don't understand your reply. As far as I can tell, nothing has changed since June: the revised proposal continues to propose an API that is not protocol-based, and the alternative continues to propose additions to RangeExpression that do not make sense, as partial ranges do not have both upper and lower bounds.<br><br>As I wrote in June, _even if clamping is determined to be a suitable addition to the standard library_, your revision appears not to address the core team feedback. I suggested one way in which you could revise your proposal to address that issue--namely, a `clamping` requirement on RangeExpression. However, I do not see where you have addressed this feedback. What am I missing?<br><div class="gmail_quote"><div dir="ltr">On Wed, Jul 19, 2017 at 22:48 Nicholas Maccharoli <<a href="mailto:nmaccharoli@gmail.com">nmaccharoli@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">Xiaodi,</div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">Sorry for the delay and thanks for replying!</div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">Well, as to if this meets the standard thats something more subjective than objective so</div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">after hearing a few opinions (hopefully differing) the community could piece together </div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">a cleaner image of if this is a good idea or not. </div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">From the previous feedback on the mailing list there were people in favor and Ben from the</div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">core swift team gave some feedback here saying:</div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><div class="gmail_default"><font color="#274e13" face="comic sans ms, sans-serif"><a href="https://github.com/apple/swift-evolution/pull/718" target="_blank">https://github.com/apple/swift-evolution/pull/718</a></font><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span style="color:rgb(36,41,46);font-family:-apple-system,system-ui,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px">The core team reviewed this proposal and are returning the proposal for revision. This is a welcome proposal in principal, but should be revised to account for the recent addition of the </span><code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:11.9px;padding:0.2em 0px;margin:0px;background-color:rgba(27,31,35,0.05);border-radius:3px;color:rgb(36,41,46)">RangeExpression</code><span style="color:rgb(36,41,46);font-family:-apple-system,system-ui,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px"> protocol, in order to allow for clamping over different kinds of range expression.</span></blockquote><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">So since the proposal is being "Returned for revisions" I wanted to propose those revisions here:</div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><div class="gmail_default"><font color="#274e13" face="comic sans ms, sans-serif"><a href="https://github.com/apple/swift-evolution/pull/723" target="_blank">https://github.com/apple/swift-evolution/pull/723</a></font><br></div><div class="gmail_default"><font color="#274e13" face="comic sans ms, sans-serif"><br></font></div><div class="gmail_default"><font color="#274e13" face="comic sans ms, sans-serif">- Nick </font></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 28, 2017 at 1:13 PM, Xiaodi Wu <span dir="ltr"><<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@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>RangeExpression is a protocol for all ranges, including partial and unbounded ranges. It would not make sense for such a protocol to have an upper bound or a lower bound.<br><br><div dir="auto">The way in which your proposal could dovetail with RangeExpression is for it to add a requirement to that protocol named `clamping(_:)`. Each type of range (_, closed, countable, countable closed, partial from, partial up to, etc.) would then implement that requirement. Then, implementations of `clamped(to:)` could call `clamping(_:)`. Although, at that point, it would be an open question whether having both clamped(to:) and clamping(_:) would be useful. I would be inclined to think that at most one of these is necessary, and only the latter is compatible with a protocol-based approach.</div><br><div dir="auto">I remain unconvinced, however, that this API meets the very high bar for standard library inclusion.</div><br></div><div><br><div class="gmail_quote"><div><div class="m_-537135592434997762h5"><div>On Tue, Jun 27, 2017 at 20:57 Nicholas Maccharoli via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-537135592434997762h5"><div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">Swift Evolution, </div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">I want to thank the community for the previous feedback for SE-0177 </div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">and also address the issue of the proposal being sent back for revisions. </div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">The current status being "Returned for revisions" reflects the detailed </div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">design section being incomplete and not working against the latest Swift 4 </div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">snapshot. </div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">Another reason mentioned by Ben Cohen was that the proposal did not take </div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">advantage of `RangeExpression` and take advantage of a generic implementation. </div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">This has been added in the "Alternatives Considered" section in the pull request that</div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">is open now but I personally favor the generic approach despite the added cost of extending `RangeExpression` enough to make the implementation possible. </div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">In short, at this time `RangeExpression` is lacking functionality to implement `clamp(to:)` </div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">in a generic fashion so if the community is in favor of extending `RangeExpression` I am </div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">more than happy to go with a generic implementation rather than the current concrete </div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">implementation that is in the proposal pull request now.</div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)">I have tried to address these issues and expand the proposal in this pull request here:</div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><br></div><div class="gmail_default"><font color="#274e13" face="comic sans ms, sans-serif"><a href="https://github.com/apple/swift-evolution/pull/723" target="_blank">https://github.com/apple/swift-evolution/pull/723</a></font><br></div><div class="gmail_default"><font color="#274e13" face="comic sans ms, sans-serif"><br></font></div><div class="gmail_default"><font color="#274e13" face="comic sans ms, sans-serif">Thank you all so much for the feedback and support, I look forward to exploring where</font></div><div class="gmail_default"><font color="#274e13" face="comic sans ms, sans-serif">we can go with this proposal and making Swift 4 the best release yet.</font></div><div class="gmail_default"><font color="#274e13" face="comic sans ms, sans-serif"><br></font></div><div class="gmail_default"><font color="#274e13" face="comic sans ms, sans-serif">Forever your Swift Evolution buddy,</font></div><div class="gmail_default"><font color="#274e13" face="comic sans ms, sans-serif"><br></font></div><div class="gmail_default"><font color="#274e13" face="comic sans ms, sans-serif"> - Nick</font></div><div class="gmail_default"><font color="#274e13" face="comic sans ms, sans-serif"><br></font></div><div class="gmail_default"><br></div></div></div></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" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div></div>
</blockquote></div><br></div>
</blockquote></div>