<div>On Sun, Jun 9, 2013 at 12:53 AM, Jonathan M Davis <span dir="ltr"><<a href="mailto:jmdavisProg@gmx.com" target="_blank">jmdavisProg@gmx.com</a>></span> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Sunday, June 09, 2013 17:12:16 Daniel Murphy wrote:<br>
> "Andrei Alexandrescu" <<a href="mailto:SeeWebsiteForEmail@erdani.org">SeeWebsiteForEmail@erdani.org</a>> wrote in message<br>
> news:koncgm$9f5$1@digitalmars.com...<br>
><br>
> > On 6/5/13 2:55 AM, Timothee Cour wrote:<br>
> >> What I suggested in my original post didn't involve any<br>
> >> indirection/abstraction; simply a renaming to be consistent with<br>
> >> existing zlib (see my points A+B in my 1st post on this thread):<br>
> >><br>
> >> std.compress.zlib.compress<br>
> >> std.compress.zlib.uncompress<br>
> >> std.compress.lzw.compress<br>
> >> std.compress.lzw.uncompress<br>
> ><br>
> > I think that's nice.<br>
> ><br>
> > Andrei<br>
><br>
> This has the problem that you now can't import more than one compression<br>
> module and still use ufcs.  The annoying one I keep hitting in phobos is<br>
> std.file.write vs std.stdio.write.  For range-based APIs it is a huge pita<br>
> to have to switch away from ufcs.  I think xyzCompress is still pretty<br>
> sweet, consistent, and completely fixes the problem.  It has the added<br>
> benefit that you can tell which compression algorithm is being used without<br>
> having to know what is imported.<br>
<br>
</div>That can be fixed by using a local alias, but it's true that it's an extra<br>
annoyance.<br>
<span class="HOEnZb"><font color="#888888"><br>
- Jonathan M Davis<br>
</font></span></blockquote></div><br><div><div>which is why I have suggested supporting UFCS with fully qualified function names:</div><div><br></div><div>auto a="".(std.path.join)("\n");</div><div><div>
myfile.(std.file.write)(text);</div></div><div><div>text.(std.stdio.write);</div></div><div><br></div><div>see post: support UFCS with fully qualified function names (was in "digitalmars.D.learn")</div><div><a href="http://forum.dlang.org/post/mailman.1453.1369099708.4724.digitalmars-d@puremagic.com">http://forum.dlang.org/post/mailman.1453.1369099708.4724.digitalmars-d@puremagic.com</a></div>
<br></div><div>it also helps searchability: if one uses local aliases such as import std.stdio:write2=write, naive searching via grep 'write(' will miss such cases. The increase in complexity is minimal, and the feature makes sense with the rest of the language.</div>