[swift-evolution] [Discussion] Generic protocols
Daniel Leping
daniel at crossroadlabs.xyz
Sat Dec 3 09:43:31 CST 2016
In general I'm very positive with the idea of generic protocols. This
discussion is more about syntactic sugar, though I really like where it
goes.
Off topic:
IMO, we should revisit approaches others already use for conflicts
resolution. I personally tend to get something similar to Scala traits.
Should fit POT smoothly and naturally.
On Sat, 3 Dec 2016 at 16:30 Adrian Zubarev <adrian.zubarev at devandartist.com>
wrote:
> If I’m not mistaken here, extension Foo where T == Int will have an error
> of redeclaration foo anyways.
>
>
> --
> Adrian Zubarev
> Sent with Airmail
>
> Am 3. Dezember 2016 um 15:22:56, Adrian Zubarev (
> adrian.zubarev at devandartist.com) schrieb:
>
> extension Foo where T == Int {
> func foo() {
> self.bar(o: 42) // calls a function that accepts an Int
> }
> }
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161203/ad9b9b8f/attachment.html>
More information about the swift-evolution
mailing list