Sender: |
|
X-To: |
|
Date: |
Wed, 7 Feb 2001 02:39:17 +0300 |
Reply-To: |
|
Subject: |
|
From: |
|
Content-Type: |
text/plain; charset=us-ascii |
In-Reply-To: |
|
Organization: |
h w c employees, b f |
MIME-Version: |
1.0 |
Parts/Attachments: |
|
|
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
|
|
|