From: utzoo!decvax!ucbvax!ARPAVAX:C70:editor-people
Newsgroups: fa.editor-p
Title: buffer structures
Article-I.D.: ucb.1964
Posted: Fri Sep 17 08:31:19 1982
Received: Wed Sep 22 05:30:07 1982

>From EAK@MIT-MC Fri Sep 17 01:51:44 1982
No linked list of lines editor that I know of (including Multics
EMACS, ZWEI, CCA EMACS, Gossling EMACS, TORES etc.) has ever
implemented the EMACS buffer bounds concept.  This probably has
to do with a more basic limitation of the linked list of lines
approach; namely, you can't easily tell which of two buffer
positions is "first" efficiently.

It seems to me that other ways of implementing buffer bounds
should exist, but since no one has done so, and because I think
bounds are a real feature, I dislike the linked list of lines
approach.

Also, relocating marks efficiently in a buffer gap scheme is
easy.  I have code that anyone can look at if they care.
Marks a certainly NOT a reason for linked lists.

Another interesting possibility is a binary-tree of "text" (which
I prefer to lines for the reasons KLH gives).  It is possible to
compare buffer positions in log time using such structures.