<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br><br>Sent from my iPad</div><div><br>On May 6, 2016, at 1:29 AM, David Hart via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>If we are discussing naming changes to reduce, here's my personal opinion:</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">* When I first encountered it, I understood exactly what it did because I knew that term of art. If it was named <b>sequence</b>, I would have been confused.</div><div id="AppleMailSignature">* If we are discussing name changes, I'd personally vote to change it to <b>fold</b>. It is the other term of art used for it, and it makes <b>unfold</b> work.</div><div id="AppleMailSignature"><br></div></div></blockquote><div><br></div><div>I have always preferred fold to reduce myself. If it solves a naming issue it might be worth making this change.</div><br><blockquote type="cite"><div><div id="AppleMailSignature">David</div><div id="AppleMailSignature"><br></div><div>On 05 May 2016, at 22:39, Chris Lattner via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><br class=""><div><blockquote type="cite" class=""><div class="">On May 5, 2016, at 1:03 PM, Erica Sadun <<a href="mailto:erica@ericasadun.com" class="">erica@ericasadun.com</a>> 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="">On May 4, 2016, at 5:50 PM, Chris Lattner via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><div class=""><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><div class="">Proposal link: <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0045-scan-takewhile-dropwhile.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0045-scan-takewhile-dropwhile.md</a><br class=""><br class="">Sequence.prefix(while:) & Sequence.drop(while:) - These are *accepted* as specified in revision 3 of the proposal.<br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">I'm still a little sad we didn't go for `prefix`/`suffix` or `take`/`drop` pairs that linguistically matched.Nonetheless I'm gratified these are hopping into the language. That said, I'm going to put on my painters cap to consider selecting some exterior latex for the feature I was most looking forward to in this proposal:</div><div class=""><br class=""></div><div class="">Core team writes:</div><blockquote type="cite" class=""><div class=""><div class="">unfold(_:applying:) - This addition is *rejected* by the core team as written, but deserves more discussion in the community, and potentially could be the subject of a future proposal. The core team felt that the utility of this operation is high enough to be worth including in the standard library, but could not find an acceptable name for it. “unfold” is problematic, despite its precedence in other language, because Swift calls the corresponding operation “reduce” and not “fold”. No one could get excited about “unreduce”. “iterate” was also considered, but a noun is more appropriate than an verb in this case. Given the lack of a good name, the core team preferred to reject <b class=""><u class="">to let the community discuss it more</u></b>.</div></div></blockquote></div><br class=""><div class="">A few thoughts:</div><div class=""><br class=""></div><div class="">* I'm not sure why a noun is more appropriate than a verb. Reduce isn't a noun, prefix isn't a noun, drop isn't a noun. </div></div></div></blockquote><div><br class=""></div><div>I’m not a naming guru, but my understanding is that ‘reduce’ was picked because it was term of art (like map), which is what allowed the misuse of a verb.</div><br class=""></div><div>One idea that came out of the core team discussion was something like:</div><div><br class=""></div><div> sequence(from: 0) { $0 += 42 }<br class=""></div><div><br class=""></div><div>Since it returns a sequence.</div><div><br class=""></div><div>-Chris</div><br class=""></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></body></html>