[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: tables holding nil
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 23 Jul 2009 08:03:37 -0300
> Are there any use cases where allowing reading t[nil] or t[nan] is useful?
t[nil] is what happens when you do t[x] and x is nil :-)
This may or not be a programmer error: you may be trying to determine
whether a field given by the user exists in a table. If the user does
not define the name of that field, then it's nil and you get t[nil].
Not too common an idiom, though.
- References:
- tables holding nil, Cosmin Apreutesei
- Re: tables holding nil, Jim Whitehead II
- Re: tables holding nil, Peter Cawley
- Re: tables holding nil, Jim Whitehead II
- Re: tables holding nil, Luiz Henrique de Figueiredo
- Re: tables holding nil, Cosmin Apreutesei
- Re: tables holding nil, Luiz Henrique de Figueiredo
- Re: tables holding nil, Cosmin Apreutesei
- Re: tables holding nil, Luiz Henrique de Figueiredo
- Re: tables holding nil, Kristofer Karlsson