This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: text buffers


From: Klaus Schilling <Klaus.Schilling@home.ivm.de>

>Is there an effective way to implement text buffers in guile?
>Unlike standard strings, text buffers should not make it expensive to
>insert and delete characters from the string. I guess logarithmic cost
>for insertion, deletion and looking up of a certain position in the buffer
>might be the best one could get in theory.
>Would it be better to implement buffers as smobs or on Scheme Level?
>Do shared substrings help in this context?

I've also been wondering about implementing buffers, and have a few more
questions that I'd like to throw into the stream.
1. What is wrong with simply porting the existing buffer code in Emacs and
giving it a SCM interface?
2. Should Guile's buffers be designed to be more general than text buffers,
i.e. to be buffers (ordered sequences) of arbitrary SCM objects?  (Think
music, rich text, whatever... )
3. I assume that we want to also support overlays / intervals / "text"
properties.  Correct?
4. Are there any interesting differences between the buffer code in Emacs
and XEmacs?