[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (work2) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sun, 23 Mar 2014 10:50:24 -0300
> This is sort of the reason why I wish Lua's core had a library
> specifically for buffers, something where you can create userdata
> buffers and fill it with lua values rawly, and then convert it into a
> immutable, pooled Lua string if you wish.
The traditional method is this:
local buffer = {} -- create a buffer
buffer[#buffer + 1] = x -- add values
s = table.concat(buffer) -- convert it into a immutable Lua string
Yes, I know, it would be faster with specific support. Mostly everything
in Lua (or any other interpreter) would be faster with specific support.
-- Roberto