• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Self and associated type requirements (yes again!)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Self and associated type requirements (yes again!)
      • From: Roland King <email@hidden>
References: 
 >Self and associated type requirements (yes again!) (From: Roland King <email@hidden>)

  • Prev by Date: Re: TableviewSelectionDidChange(_:) not called
  • Next by Date: Re: NSWindow
  • Previous by thread: Re: Self and associated type requirements (yes again!)
  • Next by thread: Re: Self and associated type requirements (yes again!)
  • Index(es):
    • Date
    • Thread