[swift-evolution] [swift evolution] [proposal] Proposal to add "implement" keyword to denote protocol method implementation

Andrew Bennett cacoyi at gmail.com
Sat Mar 19 20:20:00 CDT 2016


In short yes, submit a PR, there's some documentation that deals with this:

How to propose a change
<https://github.com/apple/swift-evolution/blob/master/process.md#how-to-propose-a-change>

It may be worthwhile mentioning the PR number in this thread, and likewise
ensuring that your PR's description is a good brief summary linking back to
this thread.


On Sun, Mar 20, 2016 at 12:18 AM, Victor Gao via swift-evolution <
swift-evolution at swift.org> wrote:

> Do I need to create a md file in the swift evolution repository to post my
> proposal?
>
> On Mar 19, 2016, at 00:12, Jordan Rose <jordan_rose at apple.com> wrote:
>
> [+swift-evolution] Sure! It's just a fancy word for doing something like
> this:
>
> protocol SelfAppendable {
>   init()
>   func +=(other: Self)
> }
>
> func *<Sequence: SelfAppendable >(sequence: Sequence, count: Int) ->
> Sequence {
>   var result = Sequence()
>   for _ in 0..<count {
>     result += sequence
>   }
>   return result
> }
>
> extension Array: SelfAppendable {}
> extension String: SelfAppendable {}
>
>
> Both Array and String already have no-argument initializers and a +=
> function, but they come from the standard library and don't (necessarily)
> satisfy any protocols, so they wouldn't be declared "implement". I can
> think of a few different ways to deal with this, but mostly I just want to
> make sure you (and everyone else) are considering this use case in your
> proposal. :-)
>
> Best,
> Jordan
>
> On Mar 18, 2016, at 17:04 , Victor Gao <victorgao44 at gmail.com> wrote:
>
> Hi Jordan,
>
> Could you explain more of what retroactive modeling is and how it affects
> the proposal? I am unfamiliar with retroactive modeling. Thanks!
>
> Victor Gao.
>
>
>
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160320/635fe9e2/attachment.html>


More information about the swift-evolution mailing list