<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="">That seems good, except…<br class=""><div><blockquote type="cite" class=""><div class=""><div class=""> 2. The method is a factory method; such calls should mirror<br class=""> initializers, with no preposition. For example,<br class=""> ```<br class=""> let x = UIColor(red: r, green: g, blue: b)<br class=""> let y = monitor.makeColor(red: r, green: g, blue: b)<br class=""></div></div></blockquote><div><br class=""></div><div>I disagree with this. I believe that PascalCase for pseudo-initializers is more meaningful and modern than “make…”.</div><div><br class=""></div><div><div class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Because the compiler can’t yet deal with this…</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""></span></div></div><div><br class=""></div><div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><div style="margin: 0px; line-height: normal;" class=""><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">protocol</span><span style="font-variant-ligatures: no-common-ligatures" class=""> Monitor {</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">typealias</span><span style="font-variant-ligatures: no-common-ligatures" class=""> Color</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">func</span><span style="font-variant-ligatures: no-common-ligatures" class=""> Color(red: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Float</span><span style="font-variant-ligatures: no-common-ligatures" class="">, green: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Float</span><span style="font-variant-ligatures: no-common-ligatures" class="">, blue: </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Float</span><span style="font-variant-ligatures: no-common-ligatures" class="">) -> </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">Color</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">}</span></div></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures" class=""> color = monitor.Color(red: r, green: g, blue: b)</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">…</span> I hack around it with this…</div><div class=""><span style="font-family: Menlo; font-size: 14px; font-variant-ligatures: no-common-ligatures; color: rgb(187, 44, 162);" class="">func</span><span style="font-family: Menlo; font-size: 14px; font-variant-ligatures: no-common-ligatures;" class=""> Color_init(red: </span><span style="font-family: Menlo; font-size: 14px; font-variant-ligatures: no-common-ligatures; color: rgb(112, 61, 170);" class="">Float</span><span style="font-family: Menlo; font-size: 14px; font-variant-ligatures: no-common-ligatures;" class="">, green: </span><span style="font-family: Menlo; font-size: 14px; font-variant-ligatures: no-common-ligatures; color: rgb(112, 61, 170);" class="">Float</span><span style="font-family: Menlo; font-size: 14px; font-variant-ligatures: no-common-ligatures;" class="">, blue: </span><span style="font-family: Menlo; font-size: 14px; font-variant-ligatures: no-common-ligatures; color: rgb(112, 61, 170);" class="">Float</span><span style="font-family: Menlo; font-size: 14px; font-variant-ligatures: no-common-ligatures;" class="">) -> </span><span style="font-family: Menlo; font-size: 14px; font-variant-ligatures: no-common-ligatures; color: rgb(79, 129, 135);" class="">Color</span></div><div class=""><span style="font-family: Menlo; font-size: 14px; font-variant-ligatures: no-common-ligatures; color: rgb(79, 129, 135);" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">…but most of the time, the “_init” is not necessary. Normally we can just namespace out way out of the collision:</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">protocol</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> Frog {}; </span><span style="font-variant-ligatures: no-common-ligatures" class="">extension</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">Frog</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> {</span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">func</span><span style="font-variant-ligatures: no-common-ligatures" class=""> String() -> </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Swift</span><span style="font-variant-ligatures: no-common-ligatures" class="">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">String</span><span style="font-variant-ligatures: no-common-ligatures" class=""> {</span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">return</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"Frog"</span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> }</span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">}</span></div></span></div></div></div></body></html>