<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 Jul 1, 2016, at 10:28 AM, Nicholas Outram via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Alegreya-Regular; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">class methods may mutate "mutable static variables” (singletons), which are dangerous in multi-threaded code.</span></div></blockquote><br class=""></div><div>This is the same argument zh ao made. But instance methods may also mutate static variables, so the fact that you’re calling a class method doesn’t make the call any more dangerous.</div><div><br class=""></div><div>Moreover, mutating <i class="">instance</i> variables can be just as dangerous for multithreaded code (and is a more frequent source of bugs IMHO).</div><div><br class=""></div><div>Really, the only significant difference is that a class method&nbsp;<i class="">can’t</i>&nbsp;modify instance variables, so from that perspective it’s actually a bit safer than an instance method call!</div><div><br class=""></div><div>—Jens</div></body></html>