<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 Jun 9, 2016, at 07:35, L. Mihalkovic &lt;<a href="mailto:laurent.mihalkovic@gmail.com" class="">laurent.mihalkovic@gmail.com</a>&gt; 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 Jun 9, 2016, at 3:27 AM, Jordan Rose via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div class="">Hi, Paulo. Thanks for bringing this up; it’s definitely an interesting problem to solve.</div><div class=""><br class=""></div><div class="">My thoughts are mostly in line with yours, that disambiguation at the call site is the most Swift-like thing to do, at least as a first step. Maybe we can add some way to record general preferences, or maybe just asking people to define a wrapper function to put the disambiguation in one place is fine.</div><div class=""><br class=""></div><div class="">I’m not particularly a fan of the “from” syntax or the “@“ syntax, but I don’t have anything better. (And the “not a fan” is entirely a taste thing, plus a general desire not to steal new keywords or operator characters. Neither of these are blockers.) I’ve been playing with silly things like this:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">str.(ModuleA.capitalized)()</div></blockquote><div class=""><br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">Seeing all these proposals that people make, it makes me thinks that extensions as they exist are not fully understood... People seem to consider them &nbsp;like the Xtext/Xtend/c# extension METHODS, which means that maybe they should also be added to Swift, and people would not be confused:</div><div class=""><br class=""></div><div class="">public static func capitalized(self:String)() {} &nbsp; &nbsp;</div><div class=""><br class=""></div><div class="">Then these would be easily individually imported from module x,y or z with the current syntax, and then "extension String {}" would retain it current scoping behavior</div><div class=""><br class=""></div><div class="">No matter what, I think many extensions are just a bad outlook on OOD, but properly understood, they are great.</div></div></div></blockquote><br class=""></div><div>I’m not sure what you mean. How does changing the declaration site solve the disambiguation problem at the call site? (And how do you think Swift extensions differ from C# extensions?)</div><div><br class=""></div><div>Jordan</div><br class=""></body></html>