Thread overview | |||||
---|---|---|---|---|---|
|
May 20, 2013 support UFCS with fully qualified function names | ||||
---|---|---|---|---|
| ||||
Attachments:
| 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 |
May 21, 2013 Re: support UFCS with fully qualified function names | ||||
---|---|---|---|---|
| ||||
Posted in reply to Timothee Cour | Timothee Cour: > I'd like to be able to use UFCS with fully qualified function names. > auto a="".(std.path.join)("\n"); It seems an acceptably-looking syntax. But maybe D.learn is not the best place to discuss new D syntax. Regarding new UFCS-related syntax, I sometimes wish for: alias T = foo.typeof; byBoolVal.assert; http://d.puremagic.com/issues/show_bug.cgi?id=4272 Bye, bearophile |
May 21, 2013 Re: support UFCS with fully qualified function names | ||||
---|---|---|---|---|
| ||||
Posted in reply to Timothee Cour | Timothee Cour:
> auto a="".(std.path.join)("\n");
I suggest to present it in the main D newsgroup. And if people don't hate it, to later write an enhancement request in bugzilla.
Bye,
bearophile
|
Copyright © 1999-2021 by the D Language Foundation