Reasons for current function overload spec

Sean Kelly sean at f4.ca
Fri Jan 4 15:48:53 PST 2008


Sean Reque wrote:
> I did a search on this forum for function overloading and for HiddenFunc and I didn't find anything, so I thought I would pose the question: is everyone generally agreed that the way function overloading works in 2.0 is a good idea? 
> 
> I think anything that can cause runtime errors is generally something to be avoided, and reading about how HiddenFuncErrors can be raised threw up red flags for me as a bad thing. I can understand wanting to simpify things over C++, but not being able to access publicly declared super class member functions, not for technical reasons, but because of language design, and even worse, not revealing the errors until runtime, seems to me like something that will cause more problems in the long run than anything else. Today I finally got gtkD to compile and run successfully on the dmd 2.008 compiler, and much time was spent figuring out how to get a debugger working so I could get a stack trace to track down a HiddenFuncError in a very long class hierarchy so I could put in the correct alias declaration in the right class. This kind of problem certainly doesn't exist in Java and C# as far as I'm aware.

Do you mean function overloading or overriding?


Sean



More information about the Digitalmars-d mailing list