opAdd and opAdd_r both match

Karen Lanrap karen at digitaldaemon.com
Sun Dec 10 20:30:22 PST 2006


Li Jie wrote:

> Why dose not select opAdd automatically? like python:

Because more than one match is a hint, that the coder might not have 
noticed, that there are indeed at least two matches, especially when 
there is a hirarchy of deriving.

In your case one of the overloads is essentially dead code with its 
possibly harmful impact on maintenance.


More information about the Digitalmars-d-learn mailing list