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:
Date:
Wed, 7 Feb 2001 09:38:27 +0000
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (43 lines)
Alexander,

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.


John



********************************************************************
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.
********************************************************************

ATOM RSS1 RSS2