Next: Syntax Protocol, Previous: Buffer Modification Protocol, Up: Protocols
The buffer protocol has been designed to be reasonably efficient with a variety of different implementation strategies (single gap buffer or sequence of independent lines). It contains (and should only contain) the absolute minimum of functionality that can be implemented efficiently independently of strategy. However, this minimum of functionality is not always convenient.
The purpose of the DREI-BASE
package is to implement
additional functionality on top of the buffer protocol, in a way that
does not depend on how the buffer protocol was implemented. Thus, the
DREI-BASE
package should remain intact across different
implementation strategies of the buffer protocol.
Achieving portability of the DREI-BASE
package is not terribly
hard as long as only buffer protocol functions are used. What is
slightly harder is to be sure to maximize efficiency across several
implementation strategies. The next section discusses such
considerations and gives guidelines to implementers of additional
functionality.
Implementers of the buffer protocol may use the contents of the next
section to make sure they respect the efficiency considerations that are
expected by the DREI-BASE
package.