TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Alexandre E. Kopilovitch
Date:
Wed, 7 Feb 2001 02:39:17 +0300
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
Pascal Obry <[log in to unmask]> wrote:
>>   class GentleThread : public Runnable {
>>     ...
>>     }
>>
>>   class BruteThread : public Runnable {
>>     ...
>>     }
>>
>> will inherit an identical implementation of the interface Runnable from the
>> ancestor class. Do you see the difference?
>
>No. It has been said that Runnable is a pure virtual class. So there is no
>inherited identical implementation.

Well, you are right. Indeed, there was a pure virtual class (and the abstract
interfaces only in another reply) and I missed that point. So, we can see from
that example that C++ has the facilities that can be used as "interfaces" in
Java sense, but in C++ those facilities are rather advanced, while in Java the
interfaces are the primary entities, at the same level as the simple classes.
Also, in C++ those facilities are regarded as a kinds of classes, which seems
to be rather artifical and misleading.


Alexander Kopilovitch                      [log in to unmask]
Saint-Petersburg
Russia

ATOM RSS1 RSS2