<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On 16 May 2016, Thorsten Seitz wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Funny, for me reading a function is quite the other way around:<br class="">I prefer to first look at the function name and parameter list to give me an idea of what the function will do (the parameter names help a lot).<br class="">Having instead first to memorize a list of types with all their constraints just builds up the cognitive load without helping much, because their usage is yet unknown.<br class=""></div></div></blockquote><div><br class=""></div><div>This is also my biggest motivation for the proposal: keeping the function name and arguments close to each other.</div><div><br class=""></div><div><blockquote type="cite" class="">So, for me reading the signature would look like (with the proposal in place):<br class=""><br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">internal func _arrayOutOfPlaceReplace<B,C>(_ source: inout B, _ bounds: Range<Int>, _ newValues: C, _ insertCount: Int)</blockquote></blockquote></blockquote></div><div><br class=""></div><div>^ Agreed! That's essentially what I'm trying to find too when skimming through code.</div><div><br class=""></div><div>An alternative approach with the same desired outcome would be moving the parameter list <i class="">before</i> the function name, either `<font face="Menlo" style="font-size: 11px;" class=""><b class="">func</b><...> someFunction(...)</font>`, or even before the `<font face="Menlo" style="font-size: 11px;" class=""><b class="">func</b></font>` keyword. But since we already use `<span style="font-size: 11px;" class=""><font face="Menlo" class=""><b class="">where</b></font></span>`, it seems more natural to me for Swift to place the constraints list to the end.</div></div><br class="">
— Pyry<div class=""><br class=""></div></body></html>