lua-users home
lua-l archive

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


On Sat, Jan 8, 2011 at 9:21 AM, Henning Diedrich <hd2010@eonblast.com> wrote:
> Isn't it pretty much guaranteed you'd never want to do
> |table.insert(t,n,nil)|?

I got into a bad habit of using it like this when appending objects;
if they were nil, it was a no-op.  Basically, a lazy shortcut using a
quirk of the language.

Should it throw an error? It would certainly wake people up earlier ;)

steve d.