<div dir="ltr">Yes, that would be a classic factory method. <div>However, what I want is to take advantage of the power of protocol extensions and use them for improving the way in which dependencies are resolved in most classic programming languages. The current meaning of static method/property in protocols, how much useful is it? I even think that it is a bit ugly to let the user to add a static property directly to a protocol via an extension, and don&#39;t let the user use that static property via the protocol.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 15, 2016 at 1:38 PM, David Waite <span dir="ltr">&lt;<a href="mailto:david@alkaline-solutions.com" target="_blank">david@alkaline-solutions.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">A static method or property on a protocol already means something separate - that the types which implement that protocol that static method/property.<div><br></div><div>I’d recommend moving your factory method to another type or a global function?</div><div><br></div><div>-DW</div><div><br><div><blockquote type="cite"><div><div class="h5"><div>On Nov 15, 2016, at 10:10 AM, Reynaldo Aguilar Casajuana via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br class="m_8464251808895595647Apple-interchange-newline"></div></div><div><div><div class="h5"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">Hi.<div>I was thinking about a simple way of implementing the handling of dependencies in swift and arrived to the following solution, however, currently it isn&#39;t supported in swift. Can we get a way of making this work?</div><div><br></div><div><a href="http://stackoverflow.com/questions/40595621/getting-dependencies-using-static-members-in-protocol-in-swift" target="_blank">http://stackoverflow.com/quest<wbr>ions/40595621/getting-dependen<wbr>cies-using-static-members-in-<wbr>protocol-in-swift</a><br></div><div><br></div></div>
</div><br></div></div></div>
______________________________<wbr>_________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br></div></blockquote></div><br></div></div></blockquote></div><br></div>