On Tue, Jun 11, 2013 at 3:33 PM, Andy Fingerhut <andy.finger...@gmail.com>wrote:

>
> I haven't done anything but think about it during commute time yet, but I
> had been wondering in how many situations it might be useful to have a
> string type that was something like Relaxed Radix Binary trees, in that
> they can be concatenated and substring'd in O(log n) worst case time, and
> yet substrings would only hold onto references of the parts that they
> explicitly refer to, and perhaps a little bit more (but not the entire
> original string).
>

"Ropes" have been around for a long time as an alternative to strings, with
fast concatenation and splitting.  RRB trees might be another, similar
route to the same goal.

I remember years ago hearing rave reports from people using Cedar (which
used ropes as its default string data type), saying it was wonderful to
have such a feature-rich string type (well, mainly they were excited about
the fast concatenation), so yes, I think it would likely be useful.  As I
recall, back in 2007, the ICFP Programming Contest was pretty much
impossible to solve unless your language had a rope implementation:
http://save-endo.cs.uu.nl/

Ropes, like strings, used to be destructive, but I think most new
implementations are immutable:

Relevant link:

http://www.ibm.com/developerworks/library/j-ropes/

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to