lua-users home
lua-l archive

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




On Fri, Nov 21, 2014 at 11:02 AM, Axel Kittenberger <axkibe@gmail.com> wrote:
You're knowledge about other peoples fields and the issues they are regulary facing?

Anyway, I agree such operator is not a good idea, simply because the count isn't stored in the core. If it would, I'd say instead by all means make that integer accessible to the script, no big harm.

However, the resoning ought to be, what is a strong concept and well doable with the current code base without bloating it? In this case it is not.

Not, "I don't need that in my field of work, so I just suppose other don't as well." Or do you have a scientific method on operationalising how often other people need this or that with their way of using Lua?

On Fri, Nov 21, 2014 at 5:47 PM, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
> In my opinion any "this isn't often required" argument is at most
> ignorance.

And at least knowledge?

-- Roberto


Alex,

I read the comment in the same way that I did a similar statement made in Programming in Lua, which I believe was regarding Linked Lists.

    An iterator to traverse a linked list is another interesting example of a
    stateless iterator. (As we already mentioned, linked lists are not frequent in
    Lua, but sometimes we need them.)

Which is not to say that getting the count is not necessary, only that there are other ways of modeling the problem that Lua is better suited for.

Is that different than how you understood it?

-Andrew