[swift-evolution] [Pitch] Moving where Clauses Out Of Parameter Lists
Milos Rankovic
milos at milos-and-slavica.net
Wed Apr 6 13:47:05 CDT 2016
> On 6 Apr 2016, at 19:35, Pyry Jahkola via swift-evolution <swift-evolution at swift.org> wrote:
>
> func anyCommonElements<T, U>(lhs: T, _ rhs: U) -> Bool
> where T : SequenceType,
> U : SequenceType,
> T.Generator.Element: Equatable,
> T.Generator.Element == U.Generator.Element
> {
> ...
> }
>
This is an excellent idea: +1!
If `where` is left on a previous line, it would also appear more in line with `throws`:
func anyCommonElements<T, U>(lhs: T, _ rhs: U) -> Bool where
T : SequenceType,
U : SequenceType,
T.Generator.Element: Equatable,
T.Generator.Element == U.Generator.Element
{
...
}
milos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160406/c84dc8d2/attachment.html>
More information about the swift-evolution
mailing list