Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.object
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!swrinde!cs.utexas.edu!news.sprintlink.net!news.wwa.com!rcm!rmartin
From: rmartin@rcmcon.com (Robert Martin)
Subject: Re: c++, smalltalk, and real-time
References: <3mjk4m$ijf@news.Belgium.EU.net> <rshapiro-1404951247530001@esb.bbn.com> <3mp76p$ov3@stc06.ctd.ornl.gov>
Organization: R. C. M. Consulting Inc. 708-918-1004
Date: Sun, 16 Apr 1995 16:13:44 GMT
Message-ID: <1995Apr16.161344.4454@rcmcon.com>
Lines: 35
Xref: glinda.oz.cs.cmu.edu comp.lang.c++:123391 comp.lang.smalltalk:22811 comp.object:29644

>R Shapiro (rshapiro@bbn.com) wrote:

>> I have the impression that C++ programmers who came from a C background
>> don't use virtual fns all that much, whereas C++ programmers who come from
>> a Lisp or Smalltalk background use them all the time. 

I think you should correct your "impression".  Background is not at
issue.  A background in C does not predispose you to avoid virtual
functions.    Virtual functions are avoided by programmers who haven't
studied OO, and don't understand it.

>> Another way to put
>> this is that C programmers who switch to C++ tend to use it more as a
>> data-abstraction language rather than as a true oop language. 

Again, being C programmers has nothing to do with this.  A programmer
of *any* language can pick up Eiffel or Smalltalk and use it as a data
abstraction language rather than an OO language if they don't study
what OO techniques are.

>> Or, to put
>> it yet another way, you can get runtime speed in C++ (we won't talk about
>> development time :-) by deliberately avoiding core oop techniques. 

Runtime speed in C++ is probably not affected by core OOP at all.
Yes, virtual functions may require an extra microsecond or two to
deploy.  (no more than that).  But that time is countered by the fact
that the virtual deployment represents functionality that would
otherwise have been addressed by if/else or switch statements.  

-- 
Robert Martin       | Design Consulting   | Training courses offered:
Object Mentor Assoc.| rmartin@rcmcon.com  |   Object Oriented Analysis
2080 Cranbrook Rd.  | Tel: (708) 918-1004 |   Object Oriented Design
Green Oaks IL 60048 | Fax: (708) 918-1023 |   C++
