Overloading/Inheritance issue

Walter Bright newshound1 at digitalmars.com
Sat Aug 4 18:10:04 PDT 2007


Bruno Medeiros wrote:
> Walter Bright wrote:
>>
>> 4) Having overloads spread across the inheritance hierarchy makes the 
>> source code resistant to visual audits. For any method call, you'll 
>> have to look at EVERY base class to see if it has an overload that is 
>> a better match.
>>
> 
> I'm not sure if you've seen my other reply to this argument, but let be 
> more explicit, with pictures. Let's say you have such a big inheritance 
> hierarchy, with overloads spread across it.

I appreciate that you can write tools to analyze it. I think they help a 
lot in writing the code, but I don't think they are as helpful for 
auditing (code review).

Another problem with them is they are not part of the D compiler itself, 
and in my experience add on tools rarely get used, no matter how useful 
they are.



More information about the Digitalmars-d mailing list