lua-users home
lua-l archive

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


On Tue, Jun 28, 2016 at 8:17 PM, Andrew Starks <andrew@starksfam.org> wrote:
> To avoid confusion, it might be the case that there needs to be a
> `sequence` library added to Lua.

You mean a _safe_ object, where you can't say t[n] if n > #t + 1, etc.
Then at least  there's a guarantee that sequences remain sequences.

This is about as paranoid as I could get. Not very efficient tho, and
needs an insert method.

https://gist.github.com/stevedonovan/759589

> My motivation for saying anything is that it works pretty well now and
> I would be nervous about breaking changes.

We don't need novelty for its own sake. There is a lot of working code
out there!