<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On 8 Apr 2016, at 12:00, Pyry Jahkola &lt;<a href="mailto:pyry.jahkola@iki.fi" class="">pyry.jahkola@iki.fi</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 08 Apr 2016, at 13:19, Haravikk via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">I think it makes sense to just rename them; it’s not as though flattened or mapped is somehow far removed from the original meaning as the actual action is the same, it’s just changing tense.<br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">-1, and not only for the reasons we neither call trigonometric functions `<span style="font-family: Menlo; font-size: 11px;" class="">sine</span>`, `<span style="font-family: Menlo; font-size: 11px;" class="">cosine</span>`, and `<font face="Menlo" style="font-size: 11px;" class="">tangent</font>`. The existing names are widely known, commonly taught in modern introductory programming courses, to the point, and googleable.</div></div></div></div></blockquote><div><br class=""></div><div>I’m not sure if sine, cosine etc. are equivalent to the case of map, flatten and so-on? Are they not nouns rather than verbs?</div><div>I don’t think googleable should be that important; what’s important is what the method does, i.e- what you want to do, as long as it’s well described it should still be searchable, especially if there is a mutating equivalent that’s named in present tense.</div><br class=""><blockquote type="cite" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class="">This idea of in-place versions is innocuous but absurd. In general, there's <i class="">no way</i> mapping `<font face="Menlo" class=""><span style="font-size: 11px;" class="">T -&gt; U</span></font>` over a `<span class="" style="font-family: Menlo; font-size: 11px;">[T]</span>` could possibly accommodate the result in the argument of type `<font face="Menlo" class=""><span style="font-size: 11px;" class="">[T]</span></font>`:</div><div class=""><br class=""></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">&nbsp; &nbsp; var xs: [Int] = ...</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">&nbsp; &nbsp; xs.mapInPlace {String($0)} // ???</span></font></div><div class=""><br class=""></div><div class="">And the same goes for `<font face="Menlo" class=""><span style="font-size: 11px;" class="">flatMap</span></font>`, and `<font face="Menlo" style="font-size: 11px;" class="">Optional</font>` and others. Likewise, `<font face="Menlo" class=""><span style="font-size: 11px;" class="">flatten()</span></font>` couldn't possibly happen in place because the result type has one level of nesting less than the argument.</div></div></div></blockquote><br class=""></div><div>True enough, didn’t think that through, though mapping where the type remains unchanged would be possible. Not really the point though, I think it should still be named consistently; if you make exceptions then why have guidelines on naming at all?</div></body></html>