best way to handle UFCS with ambiguous names: using std.typetuple.Alias!
timotheecour
timothee.cour2 at gmail.com
Tue Jun 11 11:47:07 PDT 2013
On Monday, 10 June 2013 at 08:13:42 UTC, John Colvin wrote:
> On Monday, 10 June 2013 at 02:02:09 UTC, Timothee Cour wrote:
>> UFCS chains are problematic when a symbol is ambiguous (eg
>> after import
>> std.stdio:write;import std.file:write);
>>
>> I previously suggested to add the syntax
>> 'arg1.(std.file.write)(arg2)'
>> (see 'support UFCS with fully qualified function names (was in
>> "digitalmars.D.learn")' to avoid breaking UFCS chains.
>
> We should allow this anyway, simply to deal with static imports.
What do you mean? Are you arguing in favor of
arg1.(std.file.write)(arg2) ?
It seems people didn't like that first proposal. In any case, I'm
arguing that Alias as I've suggested is always better than
renamed import.
More information about the Digitalmars-d-learn
mailing list