I'd vote for # 1 

Starting with "func" helps signal that the context is a function. (Though I 
know some things can precede "func".)
 
Having the function name second is important to me: you don't have to scan 
further for its name.

Template arguments seem more important than capture lists, so I'd put it before 
the other.

--
C. Keith Ray

* https://leanpub.com/wepntk <- buy my book?
* http://www.thirdfoundationsw.com/keith_ray_resume_2014_long.pdf
* http://agilesolutionspace.blogspot.com/

> On Nov 12, 2017, at 8:11 PM, Brent Royal-Gordon via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> 
> 1.    func fn<T>[foo, bar](param: T) throws -> T where T: Equatable { … }
> 2.    func fn[foo, bar]<T>(param: T) throws -> T where T: Equatable { … }
> 3.    func [foo, bar] fn<T>(param: T) throws -> T where T: Equatable { … }
> 4.    [foo, bar] func fn<T>(param: T) throws -> T where T: Equatable { … }
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to