lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


steve donovan <steve.j.donovan@gmail.com> writes:

> On Wed, Feb 16, 2011 at 11:55 AM, David Kastrup <dak@gnu.org> wrote:
>> I have problems envisioning an empty circular list.
>
> It's possible if the head node does not contain data, and just exists
> for bookkeeping purposes. This makes the logic easier as well, for a
> small overhead cost.

The overhead is not small once you start making lists substructures of
other data structures.  It gets worse when the corresponding data is
non-trivial to maintain (has constructors/destructors) and you
consequently need to come up with low-overhead void data
representations.

-- 
David Kastrup