support UFCS with fully qualified function names (was in "digitalmars.D.learn")

Kenji Hara k.hara.pg at gmail.com
Mon May 20 23:06:56 PDT 2013


If you need to use fully qualified name, you can use normal function call
syntax.

    auto a = std.path.join("", "\n");

Kenji Hara

2013/5/21 Timothee Cour <thelastmammoth at gmail.com>

> (I've re-posting here upon request from bearophile, who seems to like it
> :) )
>
> I'd like to be able to use UFCS with fully qualified function names.
>
> A typical use case is to disambiguate , as in the following case:
>
> import std.path;
> import std.string;
> void main(){
>     //Error: std.path.join()(const(char)[] p1, const(char)[] p2, const(
> char[])[] more...) at ... conflicts with std.string.join at ...
>     auto a="".join("\n");
>     //what I'd like to have:
>     auto a="".(std.path.join)("\n");
> }
>
> note: the fact that std.path.join!().join is deprecated is irrelevant to
> this discussion.
>
> Any chance this could be supported?
>
> benefits:
> avoids breaking UFCS chains
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130521/7def498c/attachment.html>


More information about the Digitalmars-d mailing list