Ropes (concatenation trees) for strings in D ?
Justin Whear via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Aug 18 08:36:09 PDT 2014
On Thu, 14 Aug 2014 05:57:17 +0000, Carl Sturtivant wrote:
> This is the idea I mean.
> http://citeseer.ist.psu.edu/viewdoc/download?
doi=10.1.1.14.9450&rep=rep1&type=pdf
> Here's a C++ implementation supported I think by gcc.
> http://www.sgi.com/tech/stl/Rope.html
>
> Is there a D implementation of a rope out there somewhere?
>
> How is unicode handled? Just by using dchar?
I was working on a D Rope implementation years ago (now lost to time),
when I came across this article and ditched it:
http://scienceblogs.com/goodmath/2009/02/18/gap-buffers-or-why-bother-
with-1/
The short version is that while Ropes are interesting theoretically, they
have a bad implementation complexity compared to much simpler structures
which give more than adequate results for most tasks.
More information about the Digitalmars-d-learn
mailing list