[swift-evolution] [Review] SE-0081: Move where clause to end of declaration
pyry.jahkola at iki.fi
Mon May 16 00:59:42 CDT 2016
> On 16 May 2016, at 01:45, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
> I'm actually tempted to suggest that a conformance should be *mandatory* and you should have to specify `Any` if you don't have anything more specific to say about the generic parameter:
> func map<T: Any>(@noescape transform: (Element) throws -> T) rethrows -> [T]
That's a good idea indeed if we ever intend to have other kinds of generic arguments (in particular, constant values like `length: Int`).
Even so, I wouldn't want to prohibit adding more protocol constraints in the where clause even if you can introduce all constaints of `T` at once as `T: protocol<A, B>`.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution