TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Date: Wed, 7 Feb 2001 09:38:27 +0000
MIME-version: 1.0
In-Reply-To: <[log in to unmask]>
Parts/Attachments: TEXT/PLAIN (43 lines)

Uninteresting bits snipped....

My original comment was:
>>>So what is the difference between a Java Interface and a C++ pure virtual
>>class (apart from the C++ version being less restrictive)?

>At the same time, your
>"C++ versions":
>  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?

My point being that pure virtual classes have no implementation. So essentially,
this is the same as a Java interface. You appear to have overlooked the 'pure
virtual class' comment which is very important in relation to your comments.
Certainly if a C++ class called Runnable was *not* a pure virtual class, the
behaviour of that class would be inherited, but as a pure virtual class, there
is no behaviour.


This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender
immediately by telephoning +44(1252) 373232. You should not copy it
or use it for any purpose nor disclose or distribute its contents to
any other person.