Proposition for change in D regarding Inheriting overloaded methods

Bruno Medeiros brunodomedeiros+spam at com.gmail
Fri Aug 10 04:46:30 PDT 2007


Regan Heath wrote:
> Bruno Medeiros wrote:
>> Walter Bright wrote:
>>> Regan Heath wrote:
>>>
>>> There is no runtime check or cost for it. The compiler just inserts a 
>>> call to a library support routine in D's vtbl[] entry for B.set(int).
>>>
>>>> Is this done at runtime instead of compile time because the 
>>>> parameters cannot always be determined at compile time?
>>>
>>> Yes.
>>>
>>
>> Huh? I don't understand this, how come it's not possible to detect it 
>> at compile time? Doesn't the full signature of all methods from both 
>> parent and child class have to be know at compile time?
> 
> The feature(1) would be implemented at the call site.  In this example:
>

Ah ok. Indeed, detecting if there is a call to a missing overload can 
only be done at runtime. But detecting if there are missing overloads 
can be done at compile (in the other thread Walter acknowledged it, but 
stated he preferred not to issue a compile error right there).



-- 
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list