🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sw.components
Article #350

Re: Need for multiple implementations

#350
From: johnson
Date: Wed, 01 Aug 1990 19:13
31 lines
2187 bytes
murali@tut.cis.ohio-state.edu writes:

>I am surprised to read that the need for multiple implementations of an
>abstraction (specifically, almost constant function) is not obvious.
>The almost constant function is an excellent example to demonstrate why you
>need multiple implementations.  There are several implementations (e.g.,
>BST, hashed search, etc.), and no one has better performance behavior than
>others in all repects.  A client of this abstracion will choose one of the
>several implementations based on performance requirements.

Your argument is logical.  However, it goes counter to my experience.
Smalltalk has ONE implementation of the almost constant function.  It
has one implementation of sequence and set.  Of course, it is easy to
add new implementations and to use them in addition to or in place of
the old ones.  However, the Smalltalk library designers did not do so.

In fact, I find that I rarely need a different implementation of these
basic abstractions.  Smalltalk has very good performance analysis tools,
so I am easily able to find where the bottlenecks are in my programs.
There have been a few times where I found that I needed to make a new
definition of sequence or the almost constant function, so I am not
saying that it never happens.  I am just saying that it is not nearly
as big a deal as people make it out to be.

What is important is multiple extensions of an abstraction.  Thus,
sets and sequences are both extensions of collection.  This has a
much bigger impact than the ability to make multiple implementations
of sequences.

Ralph Johnson - University of Illinois at Urbana-Champaign
Technical Details
Message-ID: <71800006@m.cs.uiuc.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!purdue!iuvax!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!johnson
References: <82613@tut.cis.ohio-state.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!purdue!iuvax!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!johnson
From: johnson@m.cs.uiuc.edu
Newsgroups: comp.sw.components
Subject: Re: Need for multiple implementations
Message-ID: <71800006@m.cs.uiuc.edu>
Date: 1 Aug 90 19:13:00 GMT
References: <82613@tut.cis.ohio-state.edu>
Lines: 31
Nf-ID: #R:tut.cis.ohio-state.edu:82613:m.cs.uiuc.edu:71800006:000:1640
Nf-From: m.cs.uiuc.edu!johnson    Aug  1 14:13:00 1990