Article View: comp.os.ms-windows.programmer.tools
Article #655Re: Linked Lists...
From: Charles Parker
Date: Thu, 24 Dec 1992 15:44
Date: Thu, 24 Dec 1992 15:44
49 lines
2950 bytes
2950 bytes
In article 92Dec23114213@pellava.uta.fi, ps@uta.fi (Pertti Suomela) writes:
>In article <1gkia2INN31u@escargot.xx.rmit.OZ.AU> rcskb@minyos.xx.rmit.OZ.AU (Kendall Bennett) writes:
> > cclark@trentu.ca (J. Chris Clark) writes:
> > >In article <1992Dec11.080213.6552@ugle.unit.no>, mariusk@solan.unit.no (Marius Kjeldahl) writes...
> > >>You should look into the CLASSLIB objects. I think they've got the most
> > >>usual lists, stacks, heaps and more adt covered in CLASSLIB. OWL for instance
> > >>uses CLASSLIB.
>
> > >Specifically, it's called the "container class library". I looked at it
> > >once, considered using it, then decided that the overhead (probable run-time
> > >and my learning/frustration time) wasn't worth it for a doublly-linked list
> > >and I wrote the procedures in about an hour.
>
>The implementation of lists in CLASSLIB is quite braindead. For
>example, you cannot insert or delete items in the middle of the list.
>I cannot imagine any use for such a list.
I have been using the Borland CLASSLIB for almost 2 years, and have found
it to be flexible, powerful, and basically, despite the increase (for small
apps) in program "fat", totally indispensable. While many programmers
prefer to stay away from the "rooted" hierarchy, it certainly saves alot
of coding time, leaving the programmer to ponder how to use a container
class, rather than how to build it.
WRT to the opinion that the List class is 'braindead' because
it does not allow node insertions, I would have to argue that the
List class was never intended for such a purpose. If you are doing
insertions into the middle of a list, then you are doing it because
the list is sorted, in which case you could easily use a Dictionary,
SortedArray, or even BTree, and save yourself the trouble of having
to traverse a list to find the correct insertion point.
BTW, in regard to the remark:
>I cannot imagine any use for such a list.
I have used the List class to great effect, happily, in easily twenty
different classes. I would say that I have been payed off for the
"overhead" in a big way.
---
---------------------------------------------------------
Charles Parker Phone.(800) 669 9165
Technical Support (617) 498 3321
CenterLine Software, Inc. Fax.(617) 868 6655
cyberspace
momma, don't let yer children grow up to be ^ cowboys ...
---------------------------------------------------------
Technical Details
Message-ID:
<1hclslINN7dd@armory.centerline.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!noc.near.net!news.centerline.com!hroudland!cparkerReferences:
<PS.92Dec23114213@pellava.uta.fi>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!noc.near.net!news.centerline.com!hroudland!cparker From: cparker@centerline.com (Charles Parker) Newsgroups: comp.os.ms-windows.programmer.tools Subject: Re: Linked Lists... Date: 24 Dec 1992 15:44:21 GMT Organization: CenterLine Software Lines: 50 Distribution: world Message-ID: <1hclslINN7dd@armory.centerline.com> References: <PS.92Dec23114213@pellava.uta.fi> Reply-To: cparker@centerline.com NNTP-Posting-Host: 140.239.2.37