lua-users home
lua-l archive

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


Rebel> There's grave accent (`) still unused in Lua syntax, so the
constructor would be
Rebel> `mutable_string` in Lua and char *lua_newmstring (lua_State *L, size_t
Rebel> size) in C.

If this (mutable Strings exposed to user) would happen in Lua due to
my proposal, this would ruin my day. For structured programming in the
systems coming we need less mutable datastructures, not more (from
coders view)

Mike> (*) I guess almost everyone would place a bet that ropes are the
Mike> perfect data structure for a text editor. But don't trust your
Mike> intuition: e.g. gap buffers are less complex and much faster.

As long a human operates the text editor, also gap buffers are far
overkill in modern CPUs. A string copy with a new char inserted per
keystroke is just fine and nothing the CPU notices. If its WYSIWYG we
are talking about, you want to concentrate on optimize (re)flowing
instead, since I can tell from my WYSIWYG coding adventures, most of
the time is spent there.