From: Hugh Sasse Staff Elec Eng <hgs / dmu.ac.uk> > I think the system of cons cells in lisp is quite nice. > This makes extending either end easy, and copes with nested > objects well. > > http://www.gnu.org/manual/elisp-manual-20-2.5/html_node/elisp_79.html > > and associated pages explain this. I don't know if it is > the best way to do it, but it could mean that iterating > through strings would use the same code as arrays, > substitution into strings would be easy. Making the list > doubly linked would ease bidirectional iteration at the > cost of memory. Fast access by [] would be more difficult, > which may be the reason for these other methods. Another interesting view on how to represent a string that can be extened and concat'ed easily is rope in SGI's STL implimentation. http://www.sgi.com/Technology/STL/Rope.html Note these non-array versions will require alot of changes to Ruby internals. It also makes the RE engine much slower which is probably not a good idea for a scripting language. -Wayne