> On May 27, 2016, at 9:31 AM, plx via swift-evolution > <[email protected]> wrote: > > For the Sequence/Collection it’s a lot of work for IMHO a rather minor > convenience, but for more-complex type associated-type relationships it could > start to pay its own way.
Is it really that minor, though? For something so commonly encountered as methods that take sequences/collections, this: func doSomething(foos: [Foo], bars: [Bar], bazzes: [Baz]) is not only a whole lot easier to type, but is worlds clearer to read than: func doSomething<S: SequenceType, T: SequenceType, U: SequenceType where S.Generator.Element == Foo, T.Generator.Element == Bar, U.Generator.Element == Baz>(foos: S, bars: T, bazzes: U) Not only is the latter line intimidating to look at as is, but it separates the contained type from the parameters themselves. Given how unwieldy this second form is, it seems almost certain that the former line will be used more frequently in the real world. Charles
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
