<div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">(I've re-posting here upon request from bearophile, who seems to like it :) )</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br>
</span></div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I'd like to be able to use UFCS with fully qualified function names.</span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">A typical use case is to disambiguate , as in the following case:<div><br></div><div><font face="Menlo"><span style="color:rgb(0,150,149)">import</span><span style="color:rgb(68,68,68)"> </span><span style="color:rgb(68,68,68)">std</span><span style="color:rgb(68,68,68)">.</span><span style="color:rgb(68,68,68)">path</span><span style="color:rgb(68,68,68)">;</span><br>
<span style="color:rgb(0,150,149)">import</span><span style="color:rgb(68,68,68)"> </span><span style="color:rgb(68,68,68)">std</span><span style="color:rgb(68,68,68)">.</span><span style="color:rgb(0,150,149)">string</span><span style="color:rgb(68,68,68)">;</span><br>
<span style="color:rgb(0,150,149)">void</span><span style="color:rgb(68,68,68)"> </span><span style="color:rgb(68,68,68)">main</span><span style="color:rgb(68,68,68)">(</span><span style="color:rgb(68,68,68)">)</span><span style="color:rgb(68,68,68)">{</span><br>
<span style="color:rgb(68,68,68)">    </span><span style="font-style:italic;color:rgb(153,153,136)">//</span><span style="font-style:italic;color:rgb(153,153,136)">Error</span><span style="font-style:italic;color:rgb(153,153,136)">:</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">std</span><span style="font-style:italic;color:rgb(153,153,136)">.</span><span style="font-style:italic;color:rgb(153,153,136)">path</span><span style="font-style:italic;color:rgb(153,153,136)">.</span><span style="font-style:italic;color:rgb(153,153,136)">join</span><span style="font-style:italic;color:rgb(153,153,136)">(</span><span style="font-style:italic;color:rgb(153,153,136)">)</span><span style="font-style:italic;color:rgb(153,153,136)">(</span><span style="font-style:italic;color:rgb(153,153,136)">const</span><span style="font-style:italic;color:rgb(153,153,136)">(</span><span style="font-style:italic;color:rgb(153,153,136)">char</span><span style="font-style:italic;color:rgb(153,153,136)">)</span><span style="font-style:italic;color:rgb(153,153,136)">[</span><span style="font-style:italic;color:rgb(153,153,136)">]</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">p1</span><span style="font-style:italic;color:rgb(153,153,136)">,</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">const</span><span style="font-style:italic;color:rgb(153,153,136)">(</span><span style="font-style:italic;color:rgb(153,153,136)">char</span><span style="font-style:italic;color:rgb(153,153,136)">)</span><span style="font-style:italic;color:rgb(153,153,136)">[</span><span style="font-style:italic;color:rgb(153,153,136)">]</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">p2</span><span style="font-style:italic;color:rgb(153,153,136)">,</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">const</span><span style="font-style:italic;color:rgb(153,153,136)">(</span><span style="font-style:italic;color:rgb(153,153,136)">char</span><span style="font-style:italic;color:rgb(153,153,136)">[</span><span style="font-style:italic;color:rgb(153,153,136)">]</span><span style="font-style:italic;color:rgb(153,153,136)">)</span><span style="font-style:italic;color:rgb(153,153,136)">[</span><span style="font-style:italic;color:rgb(153,153,136)">]</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">more</span><span style="font-style:italic;color:rgb(153,153,136)">.</span><span style="font-style:italic;color:rgb(153,153,136)">.</span><span style="font-style:italic;color:rgb(153,153,136)">.</span><span style="font-style:italic;color:rgb(153,153,136)">)</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">at</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">.</span><span style="font-style:italic;color:rgb(153,153,136)">.</span><span style="font-style:italic;color:rgb(153,153,136)">.</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">conflicts</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">with</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">std</span><span style="font-style:italic;color:rgb(153,153,136)">.</span><span style="font-style:italic;color:rgb(153,153,136)">string</span><span style="font-style:italic;color:rgb(153,153,136)">.</span><span style="font-style:italic;color:rgb(153,153,136)">join</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">at</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">.</span><span style="font-style:italic;color:rgb(153,153,136)">.</span><span style="font-style:italic;color:rgb(153,153,136)">.</span><br>
<span style="color:rgb(68,68,68)">    </span><span style="color:rgb(0,150,149)">auto</span><span style="color:rgb(68,68,68)"> </span><span style="color:rgb(68,68,68)">a</span><span style="color:rgb(68,68,68)">=</span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(68,68,68)">.</span><span style="color:rgb(68,68,68)">join</span><span style="color:rgb(68,68,68)">(</span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(165,62,0)">\n</span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(68,68,68)">)</span><span style="color:rgb(68,68,68)">;</span><br>
<span style="color:rgb(68,68,68)">    </span><span style="font-style:italic;color:rgb(153,153,136)">//</span><span style="font-style:italic;color:rgb(153,153,136)">what</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">I</span><span style="font-style:italic;color:rgb(153,153,136)">'</span><span style="font-style:italic;color:rgb(153,153,136)">d</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">like</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">to</span><span style="font-style:italic;color:rgb(153,153,136)"> </span><span style="font-style:italic;color:rgb(153,153,136)">have</span><span style="font-style:italic;color:rgb(153,153,136)">:</span><br>
<span style="color:rgb(68,68,68)">    </span><span style="color:rgb(0,150,149)">auto</span><span style="color:rgb(68,68,68)"> </span><span style="color:rgb(68,68,68)">a</span><span style="color:rgb(68,68,68)">=</span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(68,68,68)">.</span><span style="color:rgb(68,68,68)">(</span><span style="color:rgb(68,68,68)">std</span><span style="color:rgb(68,68,68)">.</span><span style="color:rgb(68,68,68)">path</span><span style="color:rgb(68,68,68)">.</span><span style="color:rgb(68,68,68)">join</span><span style="color:rgb(68,68,68)">)</span><span style="color:rgb(68,68,68)">(</span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(165,62,0)">\n</span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(68,68,68)">)</span><span style="color:rgb(68,68,68)">;</span><br>
<span style="color:rgb(68,68,68)">}</span><br></font></div><div><font face="Menlo"><span style="color:rgb(68,68,68)"><br></span></font></div><div><font face="Menlo"><span style="color:rgb(68,68,68)">note: the fact that </span></font><font color="#444444" face="Menlo">std.path.join!().join is deprecated is irrelevant to this discussion.</font></div>
<div><font color="#444444" face="Menlo"><br></font></div><div><font color="#444444" face="Menlo">Any chance this could be supported?</font></div><div><font color="#444444" face="Menlo"><br></font></div><div><font color="#444444" face="Menlo">benefits:</font></div>
<div><font color="#444444" face="Menlo">avoids breaking UFCS chains</font></div></div>