[swift-evolution] [Pitch] allow non-nominal type extension
Jon Shier
jon at jonshier.com
Fri Oct 21 13:25:18 CDT 2016
It’s also the same as:
typealias CombinedProtocol = TrackCountProvider & PublishDateProvier
extension CombinedProtocol { }
I, too, find the distinction largely pointless, but I’m not a language designer.
Jon
> On Oct 20, 2016, at 11:30 PM, Cao Jiannan via swift-evolution <swift-evolution at swift.org> wrote:
>
> It is just same as current grammar:
>
> extension TrackCountProvider where Self : PublishDateProvider { ... }
>
> with a more logical format
>
> extension TrackCountProvider & PublishDateProvider { ... }
>
> > e.g.
> >
> > extensionTrackCountProvider&PublishDateProvider{
> > vartrackCountAndPublishDateText:String{
> > varinfos: [String] = []
> >
> > iflettrackCount = trackCount{
> > infos.append("\(trackCount)")
> >
> > }
> >
> > ifletpublishDateText = publishDate?.text {
> > infos.append(publishDateText)
> > }
> >
> > returninfos.joined(separator: seperator)
> > }
> > }
> >
> >
> >
> >
> >
> _______________________________________________
> 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/20161021/8b124946/attachment.html>
More information about the swift-evolution
mailing list