lua-users home
lua-l archive

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


On Thu, Jan 28, 2021 at 2:33 PM Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:

> Note that, unlike tables, buffers are implemented outside Lua, in the
> auxiliary library. (In Lua 5.4, the entire implementation takes less
> than 200 lines of code.) If you have those specific needs, you might
> consider writing your own buffers, so that you can tune it as you like.

I would recommend taking this advice very seriously. The buffers are a
dangerous facility that even experienced users of Lua misunderstand.
The consequences of the misunderstanding can be pretty masty.

In my opinion, the buffers should be deprecated as a public API and
reserved strictly for Lua itself.

Cheers,
V.