Re: tables holding nil
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: tables holding nil
- From: Peter Cawley <lua@...>
- Date: 2009年7月22日 21:36:09 +0100
On Wed, Jul 22, 2009 at 9:30 PM, Jim Whitehead II<jnwhiteh@gmail.com> wrote:
> nil is not a valid table key. That's all!
>
Indeed, nil is not a valid table key, but metatables are intended for
non-standard cases, so allowing __newindex to handle the case of key
== nil would seem to be within the Lua philosophy. The manual's
psuedo-code for __newindex would also not give the impression of nil
being filtered out.