[futurebasic] Re: Linked Lists

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 1998 : Group Archive : Group : All Groups

From: Peter Bancroft <pbancroft@...>
Date: Tue, 29 Sep 1998 09:01:36 +1000
Pau Bruneau commented on Peter Bancrofts comments...

>> You could implement this as an array.
>> With some of the array elements being the address of the links.
>This seems to me to be a bad suggestion. The beauty of the linked list is that
>you don't have to worry about free records, remaining space (you have the
>whole heap basically at your disposal), and other administration.
>Maybe I'm missing something, but I'd sooner die than code a linked list using
>anything but handles.

It's easy to prototype a linked list in an array so that a beginner could
get the hang of how it all works. For a beginner this _may_ be fast enough.
It certainly was for me when I wrote an assembler for the 8048 series of
microprocessors. It didn't matter to me if it took 5 seconds or 2 minutes
to run.

What are the advantages of handles in linked lists, apart from saving your
life? 8)