August 10, 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
1 2 3
Next ›   Last »