lua-users home
lua-l archive

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

On Wed, Oct 24, 2018, at 09:53, Dirk Laurie wrote:
> Op Di., 23 Okt. 2018 om 17:56 het Luiz Henrique de Figueiredo
> <> geskryf:
> >
> > Wouldn't an array *library* be a simpler solution?

> So no, an array library would not be a solution at all, unless
> accompanied by an "apairs" function in the standard library.

If the array library is a standard library then such a function could
be included in it (`array.apairs(my_array)`, maybe with a method as
well: `my_array:apairs()`).

To add my (very simple) opinion, I don't care about the features at
all, as long as there is a *standard* way to detect that something
should be treated as a sequence / array / whatever, so we can all
stop using weird codebase-specific tricks when serializing / deserializing
data to / from any format that looks like JSON.

Pierre Chapuis