best way to handle UFCS with ambiguous names: using std.typetuple.Alias!
John Colvin
john.loughran.colvin at gmail.com
Tue Jun 11 12:23:49 PDT 2013
On Tuesday, 11 June 2013 at 18:47:08 UTC, timotheecour wrote:
> 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.
Having thought about it it's probably not a good idea.
More information about the Digitalmars-d-learn
mailing list