Uniform call syntax for implicit this.

Michel Fortin michel.fortin at michelf.com
Thu Feb 3 14:50:51 PST 2011


On 2011-02-03 14:47:26 -0500, Jonathan M Davis <jmdavisProg at gmx.com> said:

> I take it then that you're suggesting that the compiler automatically 
> select the
> member function when the conflicting free function is a separate module?

No, I haven't thought about that yet. That's one possibility, but it 
makes silent hijacking possible. Another is that the call is simply 
made ambiguous. If it's ambiguous, then you have to prefix it with the 
correct module or class name.

That said, before we go further, I think the complications (there are 
more) are far worse than the problem uniform call syntax is trying to 
solve (what problem exactly?). If D was designed with uniform call 
syntax in mind from the start, then it could probably have worked, but 
at the point we are now it's probably not that wise to change 
everything for a feature of unknown benefit.

Perhaps we should aim at something simpler...

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d mailing list