Re: [swift-users] Type alias with a "where" clause specifying required associated type

2017-09-05 Thread Slava Pestov via swift-users
It’s just placeholder syntax for ‘a value whose type is given by a generic parameter in the following signature’. Slava > On Sep 5, 2017, at 4:44 AM, Rudolf Adamkovič wrote: > > I see. TBH, I don’t understand why it says “Any” in the "generalized > existentials” but everything else is clear.

Re: [swift-users] Type alias with a "where" clause specifying required associated type

2017-09-05 Thread Rudolf Adamkovič via swift-users
I see. TBH, I don’t understand why it says “Any” in the "generalized existentials” but everything else is clear. Thank you Slava! R+ > On 5 Sep 2017, at 01:52, Slava Pestov wrote: > > Hi Rudolf, > > What you are describing is not possible right now. The protocol PointType > cannot be used

Re: [swift-users] Type alias with a "where" clause specifying required associated type

2017-09-04 Thread Slava Pestov via swift-users
Hi Rudolf, What you are describing is not possible right now. The protocol PointType cannot be used as a type at all, because it has an associated type requirement. Also it is not clear what a ‘where’ clause attached to a type alias would mean. There has been some discussion of ‘generalized exi

[swift-users] Type alias with a "where" clause specifying required associated type

2017-09-04 Thread Rudolf Adamkovič via swift-users
I have the following ProceduralDrawing type: public struct ProceduralDrawing where Point.Float == Float { // ... code that used Float and Point ... } public protocol PointType { associatedtype Float: FloatingPoint var x: Float { get } var y: Float { get } } I would like to avoid