Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.mathworks.com!newsfeed.internetmci.com!howland.reston.ans.net!torn!nott!cunews!dbuck
From: dbuck@superior.carleton.ca (Dave Buck)
Subject: Re: Please - Some Advice on Language Choice
X-Nntp-Posting-Host: superior.carleton.ca
Message-ID: <DJsKIr.Dn3@cunews.carleton.ca>
Sender: news@cunews.carleton.ca (News Administrator)
Organization: Carleton University, Ottawa, Canada
References: <4avbs3$cs1@decaxp.harvard.edu> <4b43ur$14gg@watnews2.watson.ibm.com>
Date: Mon, 18 Dec 1995 16:59:15 GMT
Lines: 44

In article <4b43ur$14gg@watnews2.watson.ibm.com>,
David N. Smith  <dnsmith@watson.ibm.com> wrote:
>In article <4b40d5$nh9@meaddata.lexis-nexis.com> Jeff Nelson,
>jeffn@meaddata.com writes:
>>One point I was not able to determine was whether smalltalk
>>supports what C++ would call "pure virtual" functions.
>>Basically the same question, is there any concept of abstract
>>base classes?
>>
>
>Yes, and Yes!
>
>Assuming that I undersstand the C++ terms, Smalltalk ONLY has 'pure
>virtual functions'.

He he.  This would throw a C++ programmer.  Their definition of a
'pure virtual function' (versus just a 'virtual function') is one that
must be implemented in a subclass.  (P.S. I had to look up the term to
make sure I got the right terminology).

Virtual function:
   virtual draw();

Pure virtual function:
   virtual draw() = 0;

In C++, any attempt to create an instance of a class that has any
'pure virtual functions' in it would result in a compile-time error.

Saying that Smalltalk only has 'pure virtual functions' is like saying
that all methods in Smalltalk are implemented by calling
subclassResponsibility.

I could never get this C++ jargon straight.  Why don't they all just
switch to Smalltalk :-).

David Buck
dbuck@ccs.carleton.ca

_________________________________
| David K. Buck                 |
| dbuck@ccs.carleton.ca         |
| The Object People             |
|_______________________________|
