lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Mar 23, 2012 at 10:08 AM, Mike Pall <mikelu-1203@mike.de> wrote:
> Ropes are a good idea on paper, but they increase complexity and
> rarely pay off outside targeted benchmarks and textbook examples.

I think this is too strong of a statement.  We use ropes extensively
at Google (we call them "cords") and frequently see very real gains.
I agree though that they're not a good choice for the generic string
type in a language like Lua.

It seems that ropes could be implemented as a userdata in Lua.  The
userdata's uservalue could reference the underlying string objects.

Josh