lua-users home
lua-l archive

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

On Mon, Nov 23, 2020 at 10:22 PM Roberto Ierusalimschy wrote:
> Everyone is doing exactly this way when initializing an array.
> Can you say now: "It does not occur often in real code"?

Is this real code (including the indexing from zero)?

This code is a "minimal working example".
A similar performance penalty surely happens in real code too.
But this bug does not produce an error message or wrong result, so it is not so easy to detect.

It is always possible to handpick some special case

Sorry, I don't see any "special" (or "maliciously crafted") in my code example.
The code is pretty straightforward.

Please let us dedicate our time to them.

Of course, absolutely no hurry while programming!

Do we have a slender hope that the performance penalty on assigning nils will eventually be fixed?