How do you define "object-oriented"?

Doug Way dway at riskmetrics.com
Fri Apr 26 20:54:49 UTC 2002


Kevin Fisher wrote:
> 
> On Fri, Apr 26, 2002 at 02:51:10PM -0400, Jarvis, Robert P. (Contingent) wrote:
> > By this definition C++ and Java are object-oriented even though they expose
> > atomic data types.  My experience has been that it is much easier and more
> > productive to work in an object-oriented language which doesn't clutter up
> > the landscape with 'int's and 'char's.  On the other hand I'm known for
> > being a bit dense and perhaps (despite my years of apparent success with
> > 'int' and 'char'-ridden languages) I just don't get it.  Or maybe I *do* get
> > it and it's the 'int' and 'char'-obsessed language designers who are
> > clueless.  Beats me - I'm nearsighted and keep blundering into these tall
> > things with rough brown outer coverings and occasional bits of greenery.
> > YMMV.
> 
> After spending more and more time with Smalltalk, I find myself repelled
> by anything with all those 'ints' and 'chars'.  Anything that uses
> "constructors" and "destructors" gives me that all too familiar facial twitch
> I remember from my C++ days, so I usually run screaming from that. :)
> 
> But I guess the point is, having sampled Smalltalk it just seems to me that
> the proper evolution of things (especially for something calling itself
> "object oriented") should be away from atomic types like "int", "float" and
> "char".  My disappointment with Python certainly stems from this.
> I know that everyone has their own opinion on this, however...

I think that from an ease-of-use/productivity/expressiveness point of view, having primitive types like "int" and "float" is pretty clearly inferior to just having everything be objects... I don't think any sane person with experience with both alternatives would claim otherwise.  (There used to be an IBM paper on the topic called "Primitive Types Considered Harmful", but it doesn't seem to be on the net anymore.)

The advantage to primitive types comes with the raw speed advantage.  Although it is possible to get objects (such as SmallInteger) somewhat close to primitive-type speed by using various tricks, from what I've heard.

- Doug Way
  dway at riskmetrics.com



More information about the Squeak-dev mailing list