[swift-evolution] [Revision] Fixing SE-0177: Add clamp(to:) to the stdlib

Nicholas Maccharoli nmaccharoli at gmail.com
Tue Jun 27 20:57:55 CDT 2017


Swift Evolution,

I want to thank the community for the previous feedback for SE-0177
and also address the issue of the proposal being sent back for revisions.

The current status being "Returned for revisions" reflects the detailed
design section being incomplete and not working against the latest Swift 4
snapshot.

Another reason mentioned by Ben Cohen was that the proposal did not take
advantage of `RangeExpression` and take advantage of a generic
implementation.

This has been added in the "Alternatives Considered" section in the pull
request that
is open now but I personally favor the generic approach despite the added
cost of extending `RangeExpression` enough to make the implementation
possible.

In short, at this time `RangeExpression` is lacking functionality to
implement `clamp(to:)`
in a generic fashion so if the community is in favor of extending
`RangeExpression` I am
more than happy to go with a generic implementation rather than the current
concrete
implementation that is in the proposal pull request now.

I have tried to address these issues and expand the proposal in this pull
request here:

https://github.com/apple/swift-evolution/pull/723

Thank you all so much for the feedback and support, I look forward to
exploring where
we can go with this proposal and making Swift 4 the best release yet.

Forever your Swift Evolution buddy,

   - Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170628/8354e8c3/attachment.html>


More information about the swift-evolution mailing list