Re: Self and associated type requirements (yes again!)
Re: Self and associated type requirements (yes again!)
- Subject: Re: Self and associated type requirements (yes again!)
- From: Quincey Morris <email@hidden>
- Date: Mon, 30 Nov 2015 14:17:59 -0800
- Feedback-id: 167118m:167118agrif8a:167118sX0e041KR3:SMTPCORP
On Nov 30, 2015, at 04:12 , Roland King <email@hidden> wrote:
>
> I want to say that timeSeries is any TimeSeries with an underlying type of Float, but you can’t.
The problem is that this says that you want a generic protocol, and there’s no such thing. Unfortunately, TimeSeries is not (in a sense) non-generic either, because of its associated type requirement.
I agree that the two types of protocols in the current Swift (conformable protocols and constraint protocols) is Swift’s biggest defect right now. I don’t know if it’s technically feasible (or even makes sense), but I’d love to see those unspecified typealias’s in protocols turn into generic type parameters, so the whole thing just turns into a comprehensible generic system. (Yeah, right.)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden