Re: [swift-users] Experimenting with conditional conformances

2017-11-28 Thread Antonino Ficarra via swift-users
There are different algorithms for Element==CGPoint, Element==[CGPoint], Element==[AreaPoint], etc… Your second suggestion work: protocol Inertial { funcconvexHull( _ t:AffineTransform? ) -> [CGPoint] funcarea( _ t:AffineTransform? ) -> CGFloat func

Re: [swift-users] Experimenting with conditional conformances

2017-11-28 Thread Slava Pestov via swift-users
Hi Antonio, This is explicitly mentioned in the original proposal. We do not allow multiple conditional conformances to be defined for the same type. Instead, is it possible to express your conformance as follows? extension Array : Intertial where Element : Inertial { … } Or do you really

[swift-users] Experimenting with conditional conformances

2017-11-28 Thread Antonino Ficarra via swift-users
I’have a protocol: protocol Inertial { funcconvexHull( _ t:AffineTransform? ) -> [CGPoint] funcarea( _ t:AffineTransform? ) -> CGFloat funcfirstOrderMomentums( _ t:AffineTransform? ) -> (x:CGFloat,y:CGFloat) funcsecondOrderMomentums( _