<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 Feb 22, 2017, at 10:39 AM, Max Moiseev <<a href="mailto:moiseev@apple.com" class="">moiseev@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Free functions are much less discoverable. Think about the code completion, for example.<div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Feb 22, 2017, at 6:01 AM, David Sweeris <<a href="mailto:davesweeris@mac.com" class="">davesweeris@mac.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class=""><br class=""></div><div class="">On Feb 21, 2017, at 20:46, Xiaodi Wu via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class="">Sign, perhaps, can be thought of as "part of a number," but signum refers to the signum function (<a href="http://en.wikipedia.org/wiki/Sign_function" class="">http://en.wikipedia.org/wiki/Sign_function</a>) defined as:<br class=""><br class="">-1 if x < 0<br class="">0 if x = 0<br class="">1 if x > 0<br class=""><br class="">1 isn't really "part of" 42, for instance, at least not in the sense that 42 and + are "part of" 42.</div></blockquote><br class=""><div class="">Should it be a stand-alone function, then?</div></div></div></blockquote></div></div></div></div></blockquote><br class=""></div><div>Eh, maybe… At least in Xcode, autocomplete works for free functions. I was just thinking about how people who already know about “signum" would expect it to work. Like if a mathematician sits down to write something in Swift, are they more likely to try “signum(x)” or “x.signum” first?</div><br class=""><div class="">- Dave Sweeris</div></body></html>