lua-users home
lua-l archive

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


2014-08-22 10:21 GMT+02:00 Coroutines <coroutines@gmail.com>:

> Anyway, this whole thing has me thinking that I wish "strings"
> did not exist in Lua.  It's really just userdata and sometimes
> I wish Lua didn't pool strings.

Except that userdata is advanced, whereas strings are very,
very basic indeed, there are languages like SNOBOL that have
nothing but.

Think of pooling strings as Lua's way of dispensing with the
need to write "const" zillions of times as in C++ (or even C, for
that matter). It gives me great comfort that I can write

   if line=="rather long string that appears only once"

without losing run-time efficiency.