> I’m a +1, however personally I’d prefer this to be optional my constraints
> aren’t that complex, for example:
>
> func someMethod<T where T.Element == String>(value:T) { … }
>
> Personally I prefer to keep such simple cases as they are, but would happily
> use the new ability to move more complex ones (e.g- dealing with
> Generator.Element and multiple constraints) to the end as proposed.
The example you give isn't actually a legal constraint. (The legal version
would be much longer—you'd need to conform `T` to `Sequence` or `Collection`
and test `T.Iterator.Element`, or their Swift 2 equivalents.) Can you provide a
more realistic example where you think moving the `where` clause to the end of
the declaration is overkill? I've generally found that most where clauses are
mind-numbingly long.
--
Brent Royal-Gordon
Architechies
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution