Class and Interface Fun

Christopher Wright dhasenan at gmail.com
Sun Jan 25 12:44:06 PST 2009


Denis Koroskin wrote:
> On Sun, 25 Jan 2009 08:38:18 +0300, Tim M <a at b.com> wrote:
>> class B : A,I
>> {
>>     void foo() { A.foo(); }
>> }
>>   void main()
>> {
>> }
>>
> 
> It is too verbose and makes twice an overhead. I'd like to avoid this 
> solution.

Any reasonable compiler would inline the call to A.foo.

> In fact, I believe that class B : A, I {} should just work.

I think that's something like checked exceptions: a wonderful idea in 
small examples, but it can cause problems in larger bodies of code.

I haven't ever encountered this problem, but I've heard about it twice, 
I think, so maybe my coding is just a bit simpler than other people's.


More information about the Digitalmars-d-learn mailing list