[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Definition of table.insert
- From: steve donovan <steve.j.donovan@...>
- Date: Sat, 8 Jan 2011 09:56:43 +0200
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.