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: <DJsJx3.BD5@cunews.carleton.ca>
Sender: news@cunews.carleton.ca (News Administrator)
Organization: Carleton University, Ottawa, Canada
References: <4avbs3$cs1@decaxp.harvard.edu> <4b1kka$m36@amberjack.netrunner.net> <4b40d5$nh9@meaddata.lexis-nexis.com>
Date: Mon, 18 Dec 1995 16:46:15 GMT
Lines: 54

In article <4b40d5$nh9@meaddata.lexis-nexis.com>,
Jeff Nelson <jeffn@meaddata.com> wrote:
>I was reading through the GNU smalltalk tutorial last night
>(ftp://prep.ai.mit.edu/pub/gnu) in order to learn enough about
>smalltalk to determine if it is suitable for the planned Release 2
>reimplementation of a midsized client/server product (in addition to
>looking at the excellent commercial development environments of
>course).

The last time I looked at GNU Smalltalk (v1.1.1), it was quite slow.
Perhaps Release 2 has some speedups that may make it perform better.
Also, the last time I used GNU Smalltalk, it was weak on development
tools and GUI classes.  Perhaps this has changed, if not, I would be
very reluctant to use it to develop a major system.

>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?

If I understand correctly, you are asking whether you can have the
equivalent of:
   virtual void draw() = 0;

in Smalltalk.  The answer is sort of but not quite.  The equivalent in
Smalltalk is:

draw
    self subclassResponsibility

This creates a run-time check instead of a compile-time check.  If you
want to do the same as a compile-time check, you can do it manually as
follows (in VisualWorks 2.0):

MyClass allSelectors select: [:selector |
   (MyClass findSelector: selector) last allSymbolLiterals
       includes: #subclassResponsibility] 

Printing this gives you a list of all the methods you inherited that
call subclassResponsibility.

>If not, in your experience is this a serious barrier to the
>implementation of large projects?  

No since we can do the same thing with meta-level programming.

David Buck
dbuck@ccs.carleton.ca

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